diff mbox series

Input: bma150: remove I2C_CLASS_HWMON from drivers w/o detect and address_list

Message ID 011ac933-2a45-4a63-895d-d45bfcb8576e@gmail.com (mailing list archive)
State New
Headers show
Series Input: bma150: remove I2C_CLASS_HWMON from drivers w/o detect and address_list | expand

Commit Message

Heiner Kallweit Jan. 27, 2024, 3:18 p.m. UTC
Class-based I2C probing requires detect() and address_list to be
set in the I2C client driver, see checks in i2c_detect().
It's misleading to declare I2C_CLASS_HWMON support if this
precondition isn't met.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/input/misc/bma150.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Wolfram Sang Feb. 3, 2024, 8:39 p.m. UTC | #1
On Sat, Jan 27, 2024 at 04:18:57PM +0100, Heiner Kallweit wrote:
> Class-based I2C probing requires detect() and address_list to be
> set in the I2C client driver, see checks in i2c_detect().
> It's misleading to declare I2C_CLASS_HWMON support if this
> precondition isn't met.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Heiner Kallweit March 2, 2024, 5:45 p.m. UTC | #2
On 27.01.2024 16:18, Heiner Kallweit wrote:
> Class-based I2C probing requires detect() and address_list to be
> set in the I2C client driver, see checks in i2c_detect().
> It's misleading to declare I2C_CLASS_HWMON support if this
> precondition isn't met.
> 
Any feedback here? Should this better go through the I2C tree?

> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/input/misc/bma150.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
> index 0fb4cc628..22feaa8c1 100644
> --- a/drivers/input/misc/bma150.c
> +++ b/drivers/input/misc/bma150.c
> @@ -549,7 +549,6 @@ static struct i2c_driver bma150_driver = {
>  		.name	= BMA150_DRIVER,
>  		.pm	= &bma150_pm,
>  	},
> -	.class		= I2C_CLASS_HWMON,
>  	.id_table	= bma150_id,
>  	.probe		= bma150_probe,
>  	.remove		= bma150_remove,
diff mbox series

Patch

diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
index 0fb4cc628..22feaa8c1 100644
--- a/drivers/input/misc/bma150.c
+++ b/drivers/input/misc/bma150.c
@@ -549,7 +549,6 @@  static struct i2c_driver bma150_driver = {
 		.name	= BMA150_DRIVER,
 		.pm	= &bma150_pm,
 	},
-	.class		= I2C_CLASS_HWMON,
 	.id_table	= bma150_id,
 	.probe		= bma150_probe,
 	.remove		= bma150_remove,