Re: [PATCH v5 0/8] Support ROHM BU27034 ALS sensor

2023-03-22 Thread Matti Vaittinen
On 3/22/23 12:34, Javier Martinez Canillas wrote: Andy Shevchenko writes: Hello Andy, On Wed, Mar 22, 2023 at 11:05:23AM +0200, Matti Vaittinen wrote: Revision history: v4 => v5: Mostly fixes to review comments from Andy and Jonathan. - more accurate change-log in individual patc

[PATCH v5 2/8] drm/tests: helpers: Use generic helpers

2023-03-22 Thread Matti Vaittinen
Replace DRM specific managed device creation test-helpers with generic ones. Signed-off-by: Matti Vaittinen --- v4 => v5: - do not rename + move helpers from DRM but add temporary dublicates to simplify merging. This patch depends on interface added at patch 1/8. --- drivers/gpu/drm/Kcon

[PATCH v5 0/8] Support ROHM BU27034 ALS sensor

2023-03-22 Thread Matti Vaittinen
hannel (milli lux) - provide available scales / integration times (using helpers). - adapt to renamed iio-gts-helpers.h file - bu27034 - longer lines in Kconfig - Drop bu27034_meas_en and bu27034_meas_dis wrappers. - Change device-name from bu27034-als to bu27034

Re: [PATCH v4 2/8] kunit: drm/tests: move generic helpers

2023-03-20 Thread Matti Vaittinen
Morning Stephen, On 3/20/23 21:23, Stephen Boyd wrote: Quoting Matti Vaittinen (2023-03-18 23:36:20) I think you would have an easier time if you just copied and renamed them into the kunit folder as an preparation series. Yes. That would simplify the syncing between the trees. It slightly

Re: [PATCH v4 0/8] Support ROHM BU27034 ALS sensor

2023-03-20 Thread Matti Vaittinen
On 3/19/23 18:57, Jonathan Cameron wrote: On Fri, 17 Mar 2023 16:40:16 +0200 Matti Vaittinen wrote: Support ROHM BU27034 ALS sensor Hi Matti, For ease of when this is ready to apply, better to just keep key mailing lists and individuals cc'd on all patches. Right. Sorry about th

Re: [PATCH v4 2/8] kunit: drm/tests: move generic helpers

2023-03-18 Thread Matti Vaittinen
0200, Matti Vaittinen wrote: The creation of a dummy device in order to test managed interfaces is a generally useful test feature. The drm test helpers test_kunit_helper_alloc_device() and test_kunit_helper_free_device() are doing exactly this. It makes no sense that each and every component which int

[PATCH v4 2/8] kunit: drm/tests: move generic helpers

2023-03-17 Thread Matti Vaittinen
managed interfaces will create similar helpers. Move these functions to place where it is more obvious they can be used also by other subsystems but drm. Signed-off-by: Matti Vaittinen --- Please note that there's something similat ongoing in the CCF: https://lore.kernel.or

[PATCH v4 1/8] drm/tests: helpers: rename generic helpers

2023-03-17 Thread Matti Vaittinen
interfaces will create similar helpers so rename these to more generic format. Signed-off-by: Matti Vaittinen --- drivers/gpu/drm/tests/drm_client_modeset_test.c | 4 ++-- drivers/gpu/drm/tests/drm_kunit_helpers.c | 16 drivers/gpu/drm/tests/drm_managed_test.c| 4

[PATCH v4 0/8] Support ROHM BU27034 ALS sensor

2023-03-17 Thread Matti Vaittinen
adapt to renamed iio-gts-helpers.h file - bu27034 - longer lines in Kconfig - Drop bu27034_meas_en and bu27034_meas_dis wrappers. - Change device-name from bu27034-als to bu27034 MAINTAINERS: - Add iio-list --- Matti Vaittinen (8): drm/tests: helpers: rename

Re: [RESEND2, v4, 2/2] drm/meson: dw-hdmi: Use devm_regulator_*get_enable*()

2023-01-09 Thread Matti Vaittinen
Hi Marek & All, ma 9. tammik. 2023 klo 17.23 Neil Armstrong (neil.armstr...@linaro.org) kirjoitti: > > On 09/01/2023 14:46, Marek Szyprowski wrote: > > Hi Matti, > > > > On 30.11.2022 10:23, Matti Vaittinen wrote: > >> Simplify using the devm_regulator

Re: [PATCH RESEND2 v4 2/2] drm/meson: dw-hdmi: Use devm_regulator_*get_enable*()

2022-12-01 Thread Matti Vaittinen
On 12/1/22 10:38, Neil Armstrong wrote: On 30/11/2022 10:23, Matti Vaittinen wrote: Simplify using the devm_regulator_get_enable_optional(). Also drop the now unused struct member 'hdmi_supply'. Signed-off-by: Matti Vaittinen Martin Blumenstingl Missing Acked-by, I'll add it

[PATCH RESEND2 v4 2/2] drm/meson: dw-hdmi: Use devm_regulator_*get_enable*()

2022-11-30 Thread Matti Vaittinen
Simplify using the devm_regulator_get_enable_optional(). Also drop the now unused struct member 'hdmi_supply'. Signed-off-by: Matti Vaittinen Martin Blumenstingl --- v4 resend 2: Respinning unchanged code with the commit title changed as wa suggested by Robert Foss and commit messa

[PATCH RESEND2 v4 1/2] drm/bridge: sii902x: Use devm_regulator_bulk_get_enable()

2022-11-30 Thread Matti Vaittinen
Simplify using devm_regulator_bulk_get_enable() Signed-off-by: Matti Vaittinen Acked-by: Robert Foss --- v4 resend 2: Resending unchanged code with commit title prefix adjusted as suggested by Robert I am doing a clean-up for my local git and encountered this one. Respinning as it seems this

[PATCH RESEND2 v4 0/2] Use devm helpers for regulator get and enable

2022-11-30 Thread Matti Vaittinen
- rebase on v6.1-rc1 - split meson and sii902x into own patches as requested. - slightly modify dev_err_probe() return in sii902x. --- Matti Vaittinen (2): drm/bridge: sii902x: Use devm_regulator_bulk_get_enable() drm/meson: dw-hdmi: Use devm_regulator_*get_enable

[PATCH RESEND v4 2/2] gpu: drm: meson: Use devm_regulator_*get_enable*()

2022-11-16 Thread Matti Vaittinen
Simplify using the devm_regulator_get_enable_optional(). Also drop the seemingly unused struct member 'hdmi_supply'. Signed-off-by: Matti Vaittinen --- I am doing a clean-up for my local git and encountered this one. Respinning as it seems this one fell through the cracks. --- drive

[PATCH RESEND v4 1/2] gpu: drm: sii902x: Use devm_regulator_bulk_get_enable()

2022-11-16 Thread Matti Vaittinen
Simplify using devm_regulator_bulk_get_enable() Signed-off-by: Matti Vaittinen Acked-by: Robert Foss --- I am doing a clean-up for my local git and encountered this one. Respinning as it seems this one fell through the cracks. --- drivers/gpu/drm/bridge/sii902x.c | 26

[PATCH RESEND v4 0/2] Use devm helpers for regulator get and enable

2022-11-16 Thread Matti Vaittinen
ter - rebase on v6.1-rc1 - split meson and sii902x into own patches as requested. - slightly modify dev_err_probe() return in sii902x. Matti Vaittinen (2): gpu: drm: sii902x: Use devm_regulator_bulk_get_enable() gpu: drm: meson: Use devm_regulator_*get_enable*() driv

Re: [PATCH v4 2/4] gpu: drm: sii902x: Use devm_regulator_bulk_get_enable()

2022-10-21 Thread Matti Vaittinen
On 10/21/22 16:18, Matti Vaittinen wrote: Simplify using devm_regulator_bulk_get_enable() Signed-off-by: Matti Vaittinen Reviewed-by: Robert Foss Robert, I did slightly modify the return from probe when using the dev_err_probe(). I still decided to keep your RBT - please let me know if

[PATCH v4 4/4] hwmon: adm1177: simplify using devm_regulator_get_enable()

2022-10-21 Thread Matti Vaittinen
ch is also controlled by devm. Signed-off-by: Matti Vaittinen Acked-by: Guenter Roeck --- v2 => v3: New patch --- drivers/hwmon/adm1177.c | 27 +++ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/drivers/hwmon/adm1177.c b/drivers/hwmon/adm1177.c index

[PATCH v4 3/4] hwmon: lm90: simplify using devm_regulator_get_enable()

2022-10-21 Thread Matti Vaittinen
Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable(). Signed-off-by: Matti Vaittinen Acked-by: Guenter Roeck --- RFCv1 => v2: - No changes --- drivers/hwmon/lm90.c | 20 ++-

[PATCH v4 2/4] gpu: drm: sii902x: Use devm_regulator_bulk_get_enable()

2022-10-21 Thread Matti Vaittinen
Simplify using devm_regulator_bulk_get_enable() Signed-off-by: Matti Vaittinen Reviewed-by: Robert Foss --- v3 => v4: - split to own patch. - return directly the value returned by the dev_err_probe() Please note - this is only compile-tested due to the lack of HW. Careful review and test

[PATCH v4 1/4] gpu: drm: meson: Use devm_regulator_*get_enable*()

2022-10-21 Thread Matti Vaittinen
Simplify using the devm_regulator_get_enable_optional(). Also drop the seemingly unused struct member 'hdmi_supply'. Signed-off-by: Matti Vaittinen --- v3 => v4: - split meson part to own patch RFCv1 => v2: - Change also sii902x to use devm_regulator_bulk_get_enable() Pleas

[PATCH v4 0/4] Use devm helpers for regulator get and enable

2022-10-21 Thread Matti Vaittinen
ing is highly appreciated. Revision history: v3 => v4: - Drop applied patches - rewrite cover-letter - rebase on v6.1-rc1 - split meson and sii902x into own patches as requested. - slightly modify dev_err_probe() return in sii902x. --- Matti Vaittinen

Re: [PATCH v1 09/11] regulator: bd9576: switch to using devm_fwnode_gpiod_get()

2022-09-05 Thread Matti Vaittinen
'parent' would be. I'd use the local variable only when it shortens at least one of the lines so that we avoid splitting it. After that being said - I'm not going to argue over this change either if one who is improving the driver wants to use the "helper" variable h

Re: [PATCH v1 09/11] regulator: bd9576: switch to using devm_fwnode_gpiod_get()

2022-09-05 Thread Matti Vaittinen
neric device property API as well. Signed-off-by: Dmitry Torokhov Reviewed-by: Matti Vaittinen Thanks! -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~

Re: [PATCH v1 08/11] regulator: bd71815: switch to using devm_fwnode_gpiod_get()

2022-09-05 Thread Matti Vaittinen
On 9/5/22 09:31, Dmitry Torokhov wrote: I would like to stop exporting OF-specific devm_gpiod_get_from_of_node() so that gpiolib can be cleaned a bit, so let's switch to the generic fwnode property API. Signed-off-by: Dmitry Torokhov Reviewed-by: Matti Vaittinen diff --git a/dr

Re: [PATCH v9 07/10] power: supply: mt6370: Add MediaTek MT6370 charger driver

2022-08-30 Thread Matti Vaittinen
); + if (ret) + return dev_err_probe(dev, ret, "Failed to init mivr dwork\n"); I just noticed this. Maybe this could be done using devm_delayed_work_autocancel() ? Yours -- Matti -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When thing

Re: [PATCH v9 05/10] lib: add linear range index macro

2022-08-30 Thread Matti Vaittinen
On 8/30/22 06:40, ChiaEn Wu wrote: From: ChiaEn Wu Add linear_range_idx macro for declaring the linear_range struct simply. Signed-off-by: ChiaEn Wu Reviewed-by: Matti Vaittinen --- v9 - Revise LINEAR_RANGE() and LINEAR_RANGE_IDX() --- include/linux/linear_range.h | 11

Re: [PATCH v3 03/14] gpu: drm: simplify drivers using devm_regulator_*get_enable*()

2022-08-30 Thread Matti Vaittinen
On 8/29/22 17:25, Robert Foss wrote: Thanks for the review Robert. Hi Matti, On Fri, 19 Aug 2022 at 21:18, Matti Vaittinen wrote: Simplify drivers using managed "regulator get and enable". meson: Use the devm_regulator_get_enable_optional(). Also drop the seemingly unused str

[PATCH v3 03/14] gpu: drm: simplify drivers using devm_regulator_*get_enable*()

2022-08-19 Thread Matti Vaittinen
Simplify drivers using managed "regulator get and enable". meson: Use the devm_regulator_get_enable_optional(). Also drop the seemingly unused struct member 'hdmi_supply'. sii902x: Simplify using devm_regulator_bulk_get_enable() Signed-off-by: Matti Vaittinen --- v2 =>

[PATCH v3 00/14] Use devm helpers for regulator get and enable

2022-08-19 Thread Matti Vaittinen
PU driver(s) Patch 4 - 5: simplified hwmon driver(s) Patch 6 - 14: simplified IIO driver(s) --- Matti Vaittinen (14): docs: devres: regulator: Add new get_enable functions to devres.rst clk: cdce925: simplify using devm_regulator_get_enable() gpu: drm: simplify drivers usi

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-18 Thread Matti Vaittinen
Hi Mark, On 8/15/22 18:44, Mark Brown wrote: On Fri, 12 Aug 2022 13:08:17 +0300, Matti Vaittinen wrote: Devm helpers for regulator get and enable First patch in the series is actually just a simple documentation fix which could be taken in as it is now. A few* drivers seem to use pattern

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-15 Thread Matti Vaittinen
subsystem conversation than a driver one though, or at least I think subsystems should try to arrange to make it so. -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~ Discuss - Estimate - Plan - Report and finally accomplish this: void do_work(int time) __attribute__ ((const));

Re: [RESEND PATCH v8 06/12] lib: add linear range index macro

2022-08-15 Thread Matti Vaittinen
h the [_rfd] and suffix IDX, and the other w/o the suffix and w/o the [_rfd]? Thanks for the improvements and the patience! ;) Yours -- Matti -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~

Re: [PATCH v7 10/13] power: supply: mt6370: Add MediaTek MT6370 charger driver

2022-08-14 Thread Matti Vaittinen
\ > +} Just a minor thing but I think this macro could be useful also for other drivers. Do you think you could rename it to LINEAR_RANGE_IDX() (or some such) and move it to the linear_range.h? That would allow also other drivers to use it inste

[PATCH v2 5/7] gpu: drm: simplify drivers using devm_regulator_*get_enable*()

2022-08-12 Thread Matti Vaittinen
Simplify drivers using managed "regulator get and enable". meson: Use the devm_regulator_get_enable_optional(). Also drop the seemingly unused struct member 'hdmi_supply'. sii902x: Simplify using devm_regulator_bulk_get_enable() Signed-off-by: Matti Vaittinen --- RFCv1

[PATCH v2 0/7] Devm helpers for regulator get and enable

2022-08-12 Thread Matti Vaittinen
d CLK driver(s) Patch 5: simplified GPU driver(s) Patch 6: simplified hwmon driver(s) Patch 7: simplified IIO driver(s) --- Matti Vaittinen (7): docs: devres: regulator: Add missing devm_* functions to devres.rst regulator: Add devm helpers for get and enable docs:

[RFC PATCH 5/7] gpu: drm: meson: simplify using devm_regulator_get_enable_optional()

2022-08-10 Thread Matti Vaittinen
Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(), add_action_or_reset(regulator_disable)' and use the devm_regulator_get_enable_optional(). Also drop the seemingly unused struct member 'hdmi_supply'. Signed-off-by: Matti Vaittinen --- drivers/gpu/drm/meson/

[RFC PATCH 0/7] Devm helpers for regulator get and enable

2022-08-10 Thread Matti Vaittinen
l drop the "RFC" from the series. Patch 1: Fix docmentation (devres API list) for regulator APIs Patch 2: The devm helpers. Patch 3: Add new devm-helper APIs to docs. Patches 4 ... 7: Example drivers. --- Matti Vaittinen (7): docs: devres: regulator: Add mis