This allows max6650 devices to be referenced in dts as a cooling device.
The pwm value seems duplicated in cooling_dev_state but since pwm goes
through rounding logic into data->dac, it is modified and messes with
the thermal zone state algorithms. It's also better to serve a cache
value, thus
On Thu, Apr 18, 2019 at 05:33:13PM -0400, Jean-Francois Dagenais wrote:
>
> > On Apr 18, 2019, at 16:50, Guenter Roeck wrote:
> >
> >> normally without any errors, yet the thermal-zone I defined, which is
> >> there to
> >> prevent my system from burning out, would remain incomplete (without
> On Apr 18, 2019, at 16:50, Guenter Roeck wrote:
>
>> normally without any errors, yet the thermal-zone I defined, which is there
>> to
>> prevent my system from burning out, would remain incomplete (without required
>> cooling device) and yet no errors came out of the kernel.
>>
>> I just
On Thu, Apr 18, 2019 at 04:45:00PM -0400, Jean-Francois Dagenais wrote:
>
> > On Apr 18, 2019, at 16:13, Guenter Roeck wrote:
> >
> >> + if (IS_ERR(data->cooling_dev)) {
> >> + err = PTR_ERR(data->cooling_dev);
> >> + dev_err(>dev,
> >> + "Failed to register
On Thu, Apr 18, 2019 at 04:39:35PM -0400, Jean-Francois Dagenais wrote:
>
>
> > On Apr 18, 2019, at 16:12, Guenter Roeck wrote:
> >
> > That explains why the other drivers don't generate an error message.
> > You might want to reconsider the dev_err() above; it appears it adds zero
> > value.
> On Apr 18, 2019, at 16:13, Guenter Roeck wrote:
>
>> +if (IS_ERR(data->cooling_dev)) {
>> +err = PTR_ERR(data->cooling_dev);
>> +dev_err(>dev,
>> +"Failed to register as cooling device (%d)\n", err);
>
> As mentioned in my other mail, this
> On Apr 18, 2019, at 16:12, Guenter Roeck wrote:
>
> That explains why the other drivers don't generate an error message.
> You might want to reconsider the dev_err() above; it appears it adds zero
> value.
>
>> If I am wrong, then pwm-fan.c should also be visited since my max6650_probe
>>
On Thu, Apr 18, 2019 at 04:04:52PM -0400, Jean-Francois Dagenais wrote:
> This allows max6650 devices to be referenced in dts as a cooling device.
>
> The pwm value seems duplicated in cooling_dev_state but since pwm goes
> through rounding logic into data->dac, it is modified and messes with
>
On Thu, Apr 18, 2019 at 03:54:32PM -0400, Jean-Francois Dagenais wrote:
>
>
> > On Apr 18, 2019, at 14:06, Guenter Roeck wrote:
> >
> > On Thu, Apr 18, 2019 at 02:02:48PM -0400, Jean-Francois Dagenais wrote:
> >>
> >>> On Apr 18, 2019, at 13:38, Guenter Roeck wrote:
> >>>
> +#if
This allows max6650 devices to be referenced in dts as a cooling device.
The pwm value seems duplicated in cooling_dev_state but since pwm goes
through rounding logic into data->dac, it is modified and messes with
the thermal zone state algorithms. It's also better to serve a cache
value, thus
Call devm_thermal_of_cooling_device_register() to register the cooling
device. Also introduce struct device *dev = >dev; to make the code
easier to read.
Signed-off-by: Guenter Roeck
---
drivers/hwmon/mlxreg-fan.c | 31 ++-
1 file changed, 10 insertions(+), 21
Use devm_thermal_of_cooling_device_register() to register the cooling
device. As a side effect, this fixes a driver bug:
thermal_cooling_device_unregister() was not called on device removal.
Fixes: f1fd4a4db777 ("hwmon: Add NPCM7xx PWM and Fan driver")
Cc: Tomer Maimon
Signed-off-by: Guenter
thermal_of_cooling_device_register() and thermal_cooling_device_register()
are typically called from driver probe functions, and
thermal_cooling_device_unregister() is called from remove functions. This
makes both a perfect candidate for device managed functions.
Introduce
Use devm_thermal_of_cooling_device_register() to register the cooling
device. As a side effect, this fixes a driver bug:
thermal_cooling_device_unregister() was not called on removal.
Fixes: f198907d2ff6d ("hwmon: (aspeed-pwm-tacho) cooling device support.")
Cc: Mykola Kostenok
Cc: Joel Stanley
Use devm_thermal_of_cooling_device_register() to register the cooling
device. Also use devm_add_action_or_reset() to stop the fan on device
removal, and to disable the pwm. Introduce a local 'dev' variable in
the probe function to make the code easier to read.
As a side effect, this fixes a bug
thermal_of_cooling_device_register() and thermal_cooling_device_register()
are typically called from driver probe functions, and
thermal_cooling_device_unregister() is called from remove functions. This
makes both a perfect candidate for device managed functions.
Introduce
> On Apr 18, 2019, at 14:06, Guenter Roeck wrote:
>
> On Thu, Apr 18, 2019 at 02:02:48PM -0400, Jean-Francois Dagenais wrote:
>>
>>> On Apr 18, 2019, at 13:38, Guenter Roeck wrote:
>>>
+#if IS_ENABLED(CONFIG_THERMAL)
>>>
>>> This will result in missing symbols if THERMAL is built as
> On Apr 18, 2019, at 13:38, Guenter Roeck wrote:
>
>> +#if IS_ENABLED(CONFIG_THERMAL)
>
> This will result in missing symbols if THERMAL is built as module
> and this driver is built into the kernel. You'll have to adjust
> Kconfig dependencies accordingly. See other drivers for examples.
On Thu, Apr 18, 2019 at 02:02:48PM -0400, Jean-Francois Dagenais wrote:
>
> > On Apr 18, 2019, at 13:38, Guenter Roeck wrote:
> >
> >> +#if IS_ENABLED(CONFIG_THERMAL)
> >
> > This will result in missing symbols if THERMAL is built as module
> > and this driver is built into the kernel. You'll
On Thu, Apr 18, 2019 at 12:48:13PM -0400, Jean-Francois Dagenais wrote:
> This allows max6650 devices to be referenced in dts as a cooling device.
>
> The pwm value seems duplicated in cooling_dev_state but since pwm goes
> through rounding logic into data->dac, it is modified and messes with
>
This allows max6650 devices to be referenced in dts as a cooling device.
The pwm value seems duplicated in cooling_dev_state but since pwm goes
through rounding logic into data->dac, it is modified and messes with
the thermal zone state algorithms. It's also better to serve a cache
value, thus
This allows max6650 devices to be referenced in dts as a cooling device.
The pwm value seems duplicated in cooling_dev_state but since pwm goes
through rounding logic into data->dac, it is modified and messes with
the thermal zone state algorithms. It's also better to serve a cache
value, thus
On Wed, Apr 17, 2019 at 04:12:10PM -0700, Nicolin Chen wrote:
> The CONFIG register has two 3-bit fields for conversion time
> settings of Bus-voltage and Shunt-voltage, respectively. The
> conversion settings, along with averaging mode, allow users
> to optimize available timing requirement.
>
>
On Wed, Apr 17, 2019 at 04:12:09PM -0700, Nicolin Chen wrote:
> Reading back the CONFIG register increases an extra I2C
> transaction. This's not necessary and could be replaced
> with a local variable caching the register settings.
>
> So this patch replaces two readback regmap_read() calls
>
On 4/18/19 2:44 AM, Mauro Carvalho Chehab wrote:
Em Wed, 17 Apr 2019 10:47:28 -0700
Guenter Roeck escreveu:
On Wed, Apr 17, 2019 at 10:43:37AM -0700, Guenter Roeck wrote:
On Wed, Apr 17, 2019 at 02:22:15PM -0300, Mauro Carvalho Chehab wrote:
Em Wed, 17 Apr 2019 14:13:52 -0300
Mauro Carvalho
Em Wed, 17 Apr 2019 10:47:28 -0700
Guenter Roeck escreveu:
> On Wed, Apr 17, 2019 at 10:43:37AM -0700, Guenter Roeck wrote:
> > On Wed, Apr 17, 2019 at 02:22:15PM -0300, Mauro Carvalho Chehab wrote:
> > > Em Wed, 17 Apr 2019 14:13:52 -0300
> > > Mauro Carvalho Chehab escreveu:
> > >
> > >
26 matches
Mail list logo