From: florin.leotescu@oss.nxp.com
To: Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
Florin Leotescu <florin.leotescu@nxp.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: viorel.suman@nxp.com, carlos.song@nxp.com, daniel.baluta@nxp.com,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
festevam@gmail.com
Subject: [PATCH 1/4] hwmon: emc2305: Add support for PWM frequency, polarity and output
Date: Tue, 3 Jun 2025 14:31:22 +0300 [thread overview]
Message-ID: <20250603113125.3175103-2-florin.leotescu@oss.nxp.com> (raw)
In-Reply-To: <20250603113125.3175103-1-florin.leotescu@oss.nxp.com>
From: Florin Leotescu <florin.leotescu@nxp.com>
Add three new attributes to the driver data structures to support
configuration of PWM frequency, PWM polarity and PWM output config.
Signed-off-by: Florin Leotescu <florin.leotescu@nxp.com>
---
drivers/hwmon/emc2305.c | 6 ++++++
include/linux/platform_data/emc2305.h | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c
index 234c54956a4b..8fc4fcf8a063 100644
--- a/drivers/hwmon/emc2305.c
+++ b/drivers/hwmon/emc2305.c
@@ -89,8 +89,11 @@ struct emc2305_cdev_data {
* @hwmon_dev: hwmon device
* @max_state: maximum cooling state of the cooling device
* @pwm_num: number of PWM channels
+ * @pwm_output_mask: PWM output mask
+ * @pwm_polarity_mask: PWM polarity mask
* @pwm_separate: separate PWM settings for every channel
* @pwm_min: array of minimum PWM per channel
+ * @pwm_freq: array of PWM frequency per channel
* @cdev_data: array of cooling devices data
*/
struct emc2305_data {
@@ -98,8 +101,11 @@ struct emc2305_data {
struct device *hwmon_dev;
u8 max_state;
u8 pwm_num;
+ u8 pwm_output_mask;
+ u8 pwm_polarity_mask;
bool pwm_separate;
u8 pwm_min[EMC2305_PWM_MAX];
+ u16 pwm_freq[EMC2305_PWM_MAX];
struct emc2305_cdev_data cdev_data[EMC2305_PWM_MAX];
};
diff --git a/include/linux/platform_data/emc2305.h b/include/linux/platform_data/emc2305.h
index 54d672dd6f7d..76043a97f975 100644
--- a/include/linux/platform_data/emc2305.h
+++ b/include/linux/platform_data/emc2305.h
@@ -9,14 +9,20 @@
* struct emc2305_platform_data - EMC2305 driver platform data
* @max_state: maximum cooling state of the cooling device;
* @pwm_num: number of active channels;
+ * @pwm_output_mask: PWM output mask
+ * @pwm_polarity_mask: PWM polarity mask
* @pwm_separate: separate PWM settings for every channel;
* @pwm_min: array of minimum PWM per channel;
+ * @pwm_freq: array of PWM frequency per channel
*/
struct emc2305_platform_data {
u8 max_state;
u8 pwm_num;
+ u8 pwm_output_mask;
+ u8 pwm_polarity_mask;
bool pwm_separate;
u8 pwm_min[EMC2305_PWM_MAX];
+ u16 pwm_freq[EMC2305_PWM_MAX];
};
#endif
--
2.34.1
next prev parent reply other threads:[~2025-06-03 11:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 11:31 [PATCH 0/4] Add OF support for Microchip emc2305 fan controller florin.leotescu
2025-06-03 11:31 ` florin.leotescu [this message]
2025-06-16 22:16 ` [PATCH 1/4] hwmon: emc2305: Add support for PWM frequency, polarity and output Guenter Roeck
2025-06-03 11:31 ` [PATCH 2/4] hwmon: emc2305: Configure PWM channels based on DT properties florin.leotescu
2025-06-16 22:16 ` Guenter Roeck
2025-06-03 11:31 ` [PATCH 3/4] hwmon: emc2305: Enable PWM polarity and output configuration florin.leotescu
2025-06-16 22:17 ` Guenter Roeck
2025-06-03 11:31 ` [PATCH 4/4] hwmon: emc2305: Set initial PWM minimum value during probe based on thermal state florin.leotescu
2025-06-16 22:17 ` 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=20250603113125.3175103-2-florin.leotescu@oss.nxp.com \
--to=florin.leotescu@oss.nxp.com \
--cc=carlos.song@nxp.com \
--cc=daniel.baluta@nxp.com \
--cc=festevam@gmail.com \
--cc=florin.leotescu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jdelvare@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=viorel.suman@nxp.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
all inboxes | Powered by JetHome®