diff mbox series

ipmi: ipmb: Remove I2C_CLASS_HWMON from drivers w/o detect and address_list

Message ID 18568237-0b57-4b74-86ec-a6c358a4e058@gmail.com
State Awaiting Upstream
Headers show
Series ipmi: ipmb: Remove I2C_CLASS_HWMON from drivers w/o detect and address_list | expand

Commit Message

Heiner Kallweit Jan. 27, 2024, 3:15 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/char/ipmi/ipmi_ipmb.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Wolfram Sang Feb. 3, 2024, 8:37 p.m. UTC | #1
On Sat, Jan 27, 2024 at 04:15:06PM +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:47 p.m. UTC | #2
On 27.01.2024 16:15, 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/char/ipmi/ipmi_ipmb.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_ipmb.c b/drivers/char/ipmi/ipmi_ipmb.c
> index 4e335832f..9e5c6d682 100644
> --- a/drivers/char/ipmi/ipmi_ipmb.c
> +++ b/drivers/char/ipmi/ipmi_ipmb.c
> @@ -567,7 +567,6 @@ static const struct i2c_device_id ipmi_ipmb_id[] = {
>  MODULE_DEVICE_TABLE(i2c, ipmi_ipmb_id);
>  
>  static struct i2c_driver ipmi_ipmb_driver = {
> -	.class		= I2C_CLASS_HWMON,
>  	.driver = {
>  		.name = DEVICE_NAME,
>  		.of_match_table = of_ipmi_ipmb_match,
diff mbox series

Patch

diff --git a/drivers/char/ipmi/ipmi_ipmb.c b/drivers/char/ipmi/ipmi_ipmb.c
index 4e335832f..9e5c6d682 100644
--- a/drivers/char/ipmi/ipmi_ipmb.c
+++ b/drivers/char/ipmi/ipmi_ipmb.c
@@ -567,7 +567,6 @@  static const struct i2c_device_id ipmi_ipmb_id[] = {
 MODULE_DEVICE_TABLE(i2c, ipmi_ipmb_id);
 
 static struct i2c_driver ipmi_ipmb_driver = {
-	.class		= I2C_CLASS_HWMON,
 	.driver = {
 		.name = DEVICE_NAME,
 		.of_match_table = of_ipmi_ipmb_match,