* [PATCH AUTOSEL 4.14 103/115] hwmon: (pwm-fan) Silence error on probe deferral
[not found] <20191113015622.11592-1-sashal@kernel.org>
@ 2019-11-13 1:56 ` Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 104/115] hwmon: (ina3221) Fix INA3221_CONFIG_MODE macros Sasha Levin
1 sibling, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2019-11-13 1:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Thierry Reding, Guenter Roeck, Sasha Levin, linux-hwmon
From: Thierry Reding <treding@nvidia.com>
[ Upstream commit 9f67f7583e77fe5dc57aab3a6159c2642544eaad ]
Probe deferrals aren't actual errors, so silence the error message in
case the PWM cannot yet be acquired.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/pwm-fan.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
index 6d30bec04f2d8..f981da686d7eb 100644
--- a/drivers/hwmon/pwm-fan.c
+++ b/drivers/hwmon/pwm-fan.c
@@ -221,8 +221,12 @@ static int pwm_fan_probe(struct platform_device *pdev)
ctx->pwm = devm_of_pwm_get(&pdev->dev, pdev->dev.of_node, NULL);
if (IS_ERR(ctx->pwm)) {
- dev_err(&pdev->dev, "Could not get PWM\n");
- return PTR_ERR(ctx->pwm);
+ ret = PTR_ERR(ctx->pwm);
+
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "Could not get PWM: %d\n", ret);
+
+ return ret;
}
platform_set_drvdata(pdev, ctx);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH AUTOSEL 4.14 104/115] hwmon: (ina3221) Fix INA3221_CONFIG_MODE macros
[not found] <20191113015622.11592-1-sashal@kernel.org>
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 103/115] hwmon: (pwm-fan) Silence error on probe deferral Sasha Levin
@ 2019-11-13 1:56 ` Sasha Levin
1 sibling, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2019-11-13 1:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Nicolin Chen, Guenter Roeck, Sasha Levin, linux-hwmon
From: Nicolin Chen <nicoleotsuka@gmail.com>
[ Upstream commit 791ebc9d34e9d212fc03742c31654b017d385926 ]
The three INA3221_CONFIG_MODE macros are not correctly defined here.
The MODE3-1 bits are located at BIT 2-0 according to the datasheet.
So this patch just fixes them by shifting all of them with a correct
offset. However, this isn't a crital bug fix as the driver does not
use any of them at this point.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/ina3221.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
index e6b49500c52ae..8c9555313fc3d 100644
--- a/drivers/hwmon/ina3221.c
+++ b/drivers/hwmon/ina3221.c
@@ -38,9 +38,9 @@
#define INA3221_WARN3 0x0c
#define INA3221_MASK_ENABLE 0x0f
-#define INA3221_CONFIG_MODE_SHUNT BIT(1)
-#define INA3221_CONFIG_MODE_BUS BIT(2)
-#define INA3221_CONFIG_MODE_CONTINUOUS BIT(3)
+#define INA3221_CONFIG_MODE_SHUNT BIT(0)
+#define INA3221_CONFIG_MODE_BUS BIT(1)
+#define INA3221_CONFIG_MODE_CONTINUOUS BIT(2)
#define INA3221_RSHUNT_DEFAULT 10000
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-13 2:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20191113015622.11592-1-sashal@kernel.org>
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 103/115] hwmon: (pwm-fan) Silence error on probe deferral Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 104/115] hwmon: (ina3221) Fix INA3221_CONFIG_MODE macros Sasha Levin
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).