Re: [PATCH] hwmon: (lm92) Add max6635 to lm92_id[]

2018-03-22 Thread Alvaro Gamez Machado
Hi!

On Thu, Mar 22, 2018 at 03:29:47PM +0100, Jean Delvare wrote:
> As the driver doesn't treat the two devices differently, the enum isn't
> really needed. I don't really mind though, just a notice.

Yeah, I just thought it looked cleaner this way. I thought also about
adding an enum chips entry to struct lm92_data, but I didn't like that
because there's no use for it right now, until (if) the driver is extended
to support different but similar enough chips, so I just added the enum.

> 
> Reviewed-by: Jean Delvare 
> 
> Please also update Documentation/hwmon/lm92 which currently claims that
> the max6635 must use "lm92" as prefix.

Oh, I totally forgot about that. I'll be sending patch v2 in a couple of
minutes.

Thank you!


-- 
Alvaro G. M.
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] hwmon: (lm92) Add max6635 to lm92_id[]

2018-03-22 Thread Jean Delvare
Hi Alvaro,

On Thu, 22 Mar 2018 14:43:11 +0100, Alvaro Gamez Machado wrote:
> Since autodetection of this chip was removed, it makes sense to add prefix
> max6635 so that the device can be instantiated by its actual name.
> 
> Signed-off-by: Alvaro Gamez Machado 
> ---
>  drivers/hwmon/lm92.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/lm92.c b/drivers/hwmon/lm92.c
> index 18509b5af11e..d40fe5122e94 100644
> --- a/drivers/hwmon/lm92.c
> +++ b/drivers/hwmon/lm92.c
> @@ -52,6 +52,7 @@
>   */
>  static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
>   I2C_CLIENT_END };
> +enum chips { lm92, max6635 };
>  
>  /* The LM92 registers */
>  #define LM92_REG_CONFIG  0x01 /* 8-bit, RW */
> @@ -329,8 +330,8 @@ static int lm92_probe(struct i2c_client *new_client,
>   */
>  
>  static const struct i2c_device_id lm92_id[] = {
> - { "lm92", 0 },
> - /* max6635 could be added here */
> + { "lm92", lm92 },
> + { "max6635", max6635 },
>   { }
>  };
>  MODULE_DEVICE_TABLE(i2c, lm92_id);

As the driver doesn't treat the two devices differently, the enum isn't
really needed. I don't really mind though, just a notice.

Reviewed-by: Jean Delvare 

Please also update Documentation/hwmon/lm92 which currently claims that
the max6635 must use "lm92" as prefix.

Thanks,
-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html