From: Guenter Roeck <linux@roeck-us.net>
To: Peter Rosin <peda@axentia.se>
Cc: linux-kernel@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/2] hwmon: (lm75) Add Atmel AT30TS74 support
Date: Mon, 25 Apr 2022 14:09:28 -0700 [thread overview]
Message-ID: <20220425210928.GA4184327@roeck-us.net> (raw)
In-Reply-To: <9494dfbc-f506-3e94-501d-6760c487c93d@axentia.se>
On Mon, Apr 25, 2022 at 10:35:50PM +0200, Peter Rosin wrote:
> Atmel (now Microchip) AT30TS74 is an LM75 compatible sensor. Add it.
>
> Signed-off-by: Peter Rosin <peda@axentia.se>
Applied to hwmon-next.
Thanks,
Guenter
> ---
> drivers/hwmon/Kconfig | 1 +
> drivers/hwmon/lm75.c | 14 ++++++++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 68a8a27ab3b7..d8dc58b2c55a 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -1248,6 +1248,7 @@ config SENSORS_LM75
> temperature sensor chip, with models including:
>
> - Analog Devices ADT75
> + - Atmel (now Microchip) AT30TS74
> - Dallas Semiconductor DS75, DS1775 and DS7505
> - Global Mixed-mode Technology (GMT) G751
> - Maxim MAX6625 and MAX6626
> diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
> index afdbb63237b9..66dc826f7962 100644
> --- a/drivers/hwmon/lm75.c
> +++ b/drivers/hwmon/lm75.c
> @@ -26,6 +26,7 @@
>
> enum lm75_type { /* keep sorted in alphabetical order */
> adt75,
> + at30ts74,
> ds1775,
> ds75,
> ds7505,
> @@ -128,6 +129,14 @@ static const struct lm75_params device_params[] = {
> .default_resolution = 12,
> .default_sample_time = MSEC_PER_SEC / 10,
> },
> + [at30ts74] = {
> + .set_mask = 3 << 5, /* 12-bit mode*/
> + .default_resolution = 12,
> + .default_sample_time = 200,
> + .num_sample_times = 4,
> + .sample_times = (unsigned int []){ 25, 50, 100, 200 },
> + .resolutions = (u8 []) {9, 10, 11, 12 },
> + },
> [ds1775] = {
> .clr_mask = 3 << 5,
> .set_mask = 2 << 5, /* 11-bit mode */
> @@ -645,6 +654,7 @@ static int lm75_probe(struct i2c_client *client)
>
> static const struct i2c_device_id lm75_ids[] = {
> { "adt75", adt75, },
> + { "at30ts74", at30ts74, },
> { "ds1775", ds1775, },
> { "ds75", ds75, },
> { "ds7505", ds7505, },
> @@ -680,6 +690,10 @@ static const struct of_device_id __maybe_unused lm75_of_match[] = {
> .compatible = "adi,adt75",
> .data = (void *)adt75
> },
> + {
> + .compatible = "atmel,at30ts74",
> + .data = (void *)at30ts74
> + },
> {
> .compatible = "dallas,ds1775",
> .data = (void *)ds1775
prev parent reply other threads:[~2022-04-25 21:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 20:35 [PATCH v2 0/2] Add support for Atmel AT30TS74 Peter Rosin
2022-04-25 20:35 ` [PATCH v2 1/2] dt-bindings: hwmon: Add " Peter Rosin
2022-04-25 21:09 ` Guenter Roeck
2022-04-25 20:35 ` [PATCH v2 2/2] hwmon: (lm75) Add Atmel AT30TS74 support Peter Rosin
2022-04-25 21:09 ` Guenter Roeck [this message]
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=20220425210928.GA4184327@roeck-us.net \
--to=linux@roeck-us.net \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).