From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Daniel Matyas <daniel.matyas@analog.com>
Cc: "Jean Delvare" <jdelvare@suse.com>,
"Guenter Roeck" <linux@roeck-us.net>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Mark Brown" <broonie@kernel.org>, "Marek Vasut" <marex@denx.de>,
"Vincent Tremblay" <vincent@vtremblay.dev>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Greg.Schwendimann@infineon.com" <Greg.Schwendimann@infineon.com>,
"Pali Rohár" <pali@kernel.org>,
"Conor Dooley" <conor.dooley@microchip.com>,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] hwmon: max31827: add MAX31827 driver
Date: Thu, 6 Apr 2023 21:20:53 +0200 [thread overview]
Message-ID: <d1feb2c0-98b1-af38-e9c6-432a72b352f1@linaro.org> (raw)
In-Reply-To: <20230406164331.6557-3-daniel.matyas@analog.com>
On 06/04/2023 18:43, Daniel Matyas wrote:
> MAX31827 is a low-power temperature switch with I2C interface.
>
(...)
> +
> +static const struct hwmon_ops max31827_hwmon_ops = {
> + .is_visible = max31827_is_visible,
> + .read = max31827_read,
> + .write = max31827_write,
> +};
> +
> +static const struct hwmon_chip_info max31827_chip_info = {
> + .ops = &max31827_hwmon_ops,
> + .info = max31827_info,
> +};
> +
> +static int max31827_probe(struct i2c_client *client)
> +{
> + struct device *dev = &client->dev;
> + struct device *hwmon_dev;
> + struct max31827_state *st;
> + int ret;
> +
> + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WORD_DATA))
> + return -EOPNOTSUPP;
> +
> + st = devm_kzalloc(dev, sizeof(struct max31827_state), GFP_KERNEL);
sizeof(*...)
> + if (!st)
> + return -ENOMEM;
> +
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-04-06 19:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 16:43 [PATCH 0/2] Hwmon driver for MAX31827 temperature switch Daniel Matyas
2023-04-06 16:43 ` [PATCH 1/2] dt-bindings: hwmon: add MAX31827 Daniel Matyas
2023-04-06 16:43 ` [PATCH 2/2] hwmon: max31827: add MAX31827 driver Daniel Matyas
2023-04-06 19:06 ` Guenter Roeck
2023-04-06 19:20 ` Krzysztof Kozlowski [this message]
2023-04-06 18:14 ` [PATCH 1/2] dt-bindings: hwmon: add MAX31827 Rob Herring
2023-04-06 19:17 ` Krzysztof Kozlowski
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=d1feb2c0-98b1-af38-e9c6-432a72b352f1@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=Greg.Schwendimann@infineon.com \
--cc=broonie@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=daniel.matyas@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=marex@denx.de \
--cc=pali@kernel.org \
--cc=robh+dt@kernel.org \
--cc=vincent@vtremblay.dev \
/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