Message ID | 20250402-al3010-iio-regmap-v4-0-d189bea87261@ixit.cz (mailing list archive) |
---|---|
Headers | show |
Series | iio: light: Modernize al3010 and al3320a codebase | expand |
On Wed, 02 Apr 2025 21:33:23 +0200 David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org> wrote: > This series aims to improve code readability and modernize it to align > with the recently upstreamed AL3000a. > > Apart from slightly improved error reporting, and error handling > there should be no functional changes. > > Module before after > al3010 72 kB 58 kB > al3320a 72 kB 58 kB > > Signed-off-by: David Heidelberg <david@ixit.cz> > --- Applied, but with tweaks to not add print messages as described in patches 1 and 3. That meant a bunch of hand application was needed for 4-5. Please check the result in the testing branch of iio.git. Thanks, Jonathan > Changes in v4: > - Fixed mixed-up rebase changes between commits and added > regmap_get_device into _init functions to get the device. > - Link to v3: https://lore.kernel.org/r/20250402-al3010-iio-regmap-v3-0-cc3da273b5b2@ixit.cz > > Changes in v3: > - Stripped patches merged from second version of patchset. > - Dropped iio: light: al3010: Move devm_add_action_or_reset back to _probe > in favor of opposite approach moving devm_add.. to _init for al3xx0a: > - iio: light: al3000a: Fix an error handling path in al3000a_probe() > - iio: light: al3320a: Fix an error handling path in al3320a_probe() > - Link to v2: https://lore.kernel.org/r/20250319-al3010-iio-regmap-v2-0-1310729d0543@ixit.cz > > Changes in v2: > - Dropped Daniel's email update. > - Dropped DRV_NAME introduction for al3000a > - Added DRV_NAME define removal for al3010 and al3320a. > - Splitted unsigned int conversion into separate patches. > - Replaced generic value with specific raw and gain variable. > - Use dev_err_probe() for error handling. > - Separated devm_add_action_or_reset move from _init back to _probe. > - Dropped copyright update. > - Link to v1: https://lore.kernel.org/r/20250308-al3010-iio-regmap-v1-0-b672535e8213@ixit.cz > > --- > David Heidelberg (5): > iio: light: al3010: Improve al3010_init error handling with dev_err_probe() > iio: light: al3000a: Fix an error handling path in al3000a_probe() > iio: light: al3320a: Fix an error handling path in al3320a_probe() > iio: light: al3010: Implement regmap support > iio: light: al3320a: Implement regmap support > > drivers/iio/light/al3000a.c | 9 +++-- > drivers/iio/light/al3010.c | 85 +++++++++++++++++++++++-------------------- > drivers/iio/light/al3320a.c | 89 +++++++++++++++++++++++++-------------------- > 3 files changed, 100 insertions(+), 83 deletions(-) > --- > base-commit: f8ffc92ae9052e6615896052f0c5b808bfc17520 > change-id: 20250308-al3010-iio-regmap-038cea39f85d > > Best regards,
On 05/04/2025 19:12, Jonathan Cameron wrote: > On Wed, 02 Apr 2025 21:33:23 +0200 > David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org> wrote: > >> This series aims to improve code readability and modernize it to align >> with the recently upstreamed AL3000a. >> >> Apart from slightly improved error reporting, and error handling >> there should be no functional changes. >> >> Module before after >> al3010 72 kB 58 kB >> al3320a 72 kB 58 kB >> >> Signed-off-by: David Heidelberg <david@ixit.cz> >> --- > Applied, but with tweaks to not add print messages as described in patches 1 and 3. > That meant a bunch of hand application was needed for 4-5. Please check the result > in the testing branch of iio.git. It does look good. Thank you! David > > Thanks, > > Jonathan > >> Changes in v4: >> - Fixed mixed-up rebase changes between commits and added >> regmap_get_device into _init functions to get the device. >> - Link to v3: https://lore.kernel.org/r/20250402-al3010-iio-regmap-v3-0-cc3da273b5b2@ixit.cz >> >> Changes in v3: >> - Stripped patches merged from second version of patchset. >> - Dropped iio: light: al3010: Move devm_add_action_or_reset back to _probe >> in favor of opposite approach moving devm_add.. to _init for al3xx0a: >> - iio: light: al3000a: Fix an error handling path in al3000a_probe() >> - iio: light: al3320a: Fix an error handling path in al3320a_probe() >> - Link to v2: https://lore.kernel.org/r/20250319-al3010-iio-regmap-v2-0-1310729d0543@ixit.cz >> >> Changes in v2: >> - Dropped Daniel's email update. >> - Dropped DRV_NAME introduction for al3000a >> - Added DRV_NAME define removal for al3010 and al3320a. >> - Splitted unsigned int conversion into separate patches. >> - Replaced generic value with specific raw and gain variable. >> - Use dev_err_probe() for error handling. >> - Separated devm_add_action_or_reset move from _init back to _probe. >> - Dropped copyright update. >> - Link to v1: https://lore.kernel.org/r/20250308-al3010-iio-regmap-v1-0-b672535e8213@ixit.cz >> >> --- >> David Heidelberg (5): >> iio: light: al3010: Improve al3010_init error handling with dev_err_probe() >> iio: light: al3000a: Fix an error handling path in al3000a_probe() >> iio: light: al3320a: Fix an error handling path in al3320a_probe() >> iio: light: al3010: Implement regmap support >> iio: light: al3320a: Implement regmap support >> >> drivers/iio/light/al3000a.c | 9 +++-- >> drivers/iio/light/al3010.c | 85 +++++++++++++++++++++++-------------------- >> drivers/iio/light/al3320a.c | 89 +++++++++++++++++++++++++-------------------- >> 3 files changed, 100 insertions(+), 83 deletions(-) >> --- >> base-commit: f8ffc92ae9052e6615896052f0c5b808bfc17520 >> change-id: 20250308-al3010-iio-regmap-038cea39f85d >> >> Best regards, >
This series aims to improve code readability and modernize it to align with the recently upstreamed AL3000a. Apart from slightly improved error reporting, and error handling there should be no functional changes. Module before after al3010 72 kB 58 kB al3320a 72 kB 58 kB Signed-off-by: David Heidelberg <david@ixit.cz> --- Changes in v4: - Fixed mixed-up rebase changes between commits and added regmap_get_device into _init functions to get the device. - Link to v3: https://lore.kernel.org/r/20250402-al3010-iio-regmap-v3-0-cc3da273b5b2@ixit.cz Changes in v3: - Stripped patches merged from second version of patchset. - Dropped iio: light: al3010: Move devm_add_action_or_reset back to _probe in favor of opposite approach moving devm_add.. to _init for al3xx0a: - iio: light: al3000a: Fix an error handling path in al3000a_probe() - iio: light: al3320a: Fix an error handling path in al3320a_probe() - Link to v2: https://lore.kernel.org/r/20250319-al3010-iio-regmap-v2-0-1310729d0543@ixit.cz Changes in v2: - Dropped Daniel's email update. - Dropped DRV_NAME introduction for al3000a - Added DRV_NAME define removal for al3010 and al3320a. - Splitted unsigned int conversion into separate patches. - Replaced generic value with specific raw and gain variable. - Use dev_err_probe() for error handling. - Separated devm_add_action_or_reset move from _init back to _probe. - Dropped copyright update. - Link to v1: https://lore.kernel.org/r/20250308-al3010-iio-regmap-v1-0-b672535e8213@ixit.cz --- David Heidelberg (5): iio: light: al3010: Improve al3010_init error handling with dev_err_probe() iio: light: al3000a: Fix an error handling path in al3000a_probe() iio: light: al3320a: Fix an error handling path in al3320a_probe() iio: light: al3010: Implement regmap support iio: light: al3320a: Implement regmap support drivers/iio/light/al3000a.c | 9 +++-- drivers/iio/light/al3010.c | 85 +++++++++++++++++++++++-------------------- drivers/iio/light/al3320a.c | 89 +++++++++++++++++++++++++-------------------- 3 files changed, 100 insertions(+), 83 deletions(-) --- base-commit: f8ffc92ae9052e6615896052f0c5b808bfc17520 change-id: 20250308-al3010-iio-regmap-038cea39f85d Best regards,