From: Guenter Roeck <linux@roeck-us.net>
To: Xingjiang Qiao <nanpuyue@gmail.com>
Cc: Jean Delvare <jdelvare@suse.com>,
Michael Shych <michaelsh@nvidia.com>,
linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 1/2] hwmon: (emc2305) fix unable to probe emc2301/2/3
Date: Tue, 6 Dec 2022 14:39:12 -0800 [thread overview]
Message-ID: <20221206223912.GA863125@roeck-us.net> (raw)
In-Reply-To: <20221206055331.170459-1-nanpuyue@gmail.com>
On Tue, Dec 06, 2022 at 01:53:30PM +0800, Xingjiang Qiao wrote:
> The definitions of 'EMC2305_REG_PRODUCT_ID' and 'EMC2305_REG_DEVICE' are
> both '0xfd', they actually return the same value, but the values returned
> by emc2301/2/3/5 are different, so probe emc2301/2/3 will fail, This patch
> fixes that.
>
> Signed-off-by: Xingjiang Qiao <nanpuyue@gmail.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/emc2305.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c
> index aa1f25add0b6..9a78ca22541e 100644
> --- a/drivers/hwmon/emc2305.c
> +++ b/drivers/hwmon/emc2305.c
> @@ -16,7 +16,6 @@ static const unsigned short
> emc2305_normal_i2c[] = { 0x27, 0x2c, 0x2d, 0x2e, 0x2f, 0x4c, 0x4d, I2C_CLIENT_END };
>
> #define EMC2305_REG_DRIVE_FAIL_STATUS 0x27
> -#define EMC2305_REG_DEVICE 0xfd
> #define EMC2305_REG_VENDOR 0xfe
> #define EMC2305_FAN_MAX 0xff
> #define EMC2305_FAN_MIN 0x00
> @@ -524,7 +523,7 @@ static int emc2305_probe(struct i2c_client *client, const struct i2c_device_id *
> struct device *dev = &client->dev;
> struct emc2305_data *data;
> struct emc2305_platform_data *pdata;
> - int vendor, device;
> + int vendor;
> int ret;
> int i;
>
> @@ -535,10 +534,6 @@ static int emc2305_probe(struct i2c_client *client, const struct i2c_device_id *
> if (vendor != EMC2305_VENDOR)
> return -ENODEV;
>
> - device = i2c_smbus_read_byte_data(client, EMC2305_REG_DEVICE);
> - if (device != EMC2305_DEVICE)
> - return -ENODEV;
> -
> data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
next prev parent reply other threads:[~2022-12-06 22:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 17:36 [PATCH 1/2] hwmon: (emc2305) fix unable to probe emc2301/2/3/4 Xingjiang Qiao
2022-12-05 17:36 ` [PATCH 2/2] hwmon: (emc2305) fix pwm never being able to set lower Xingjiang Qiao
2022-12-05 18:27 ` Michael Shych
2022-12-05 19:28 ` Xingjiang Qiao
2022-12-05 18:27 ` Guenter Roeck
2022-12-06 5:30 ` Xingjiang Qiao
2022-12-05 18:15 ` [PATCH 1/2] hwmon: (emc2305) fix unable to probe emc2301/2/3/4 Guenter Roeck
2022-12-05 18:40 ` Michael Shych
2022-12-05 19:00 ` [PATCH v2 " Xingjiang Qiao
2022-12-06 5:53 ` [PATCH v3 1/2] hwmon: (emc2305) fix unable to probe emc2301/2/3 Xingjiang Qiao
2022-12-06 7:03 ` Guenter Roeck
2022-12-06 12:01 ` Xingjiang Qiao
2022-12-06 22:39 ` Guenter Roeck [this message]
2022-12-06 5:53 ` [PATCH v3 2/2] hwmon: (emc2305) fix pwm never being able to set lower Xingjiang Qiao
2022-12-06 22:46 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221206223912.GA863125@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=michaelsh@nvidia.com \
--cc=nanpuyue@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox