The code in occ_get_powr_avg() invokes div64_u64() without checking the
divisor. In case the divisor is zero, kernel gets an "Division by zero
in kernel" error.
Check the divisor and make it return 0 if the divisor is 0.
Signed-off-by: Lei YU
Reviewed-by: Eddie James
---
drivers
The occ's extended status is checked and shown as sysfs attributes. But
the code was incorrectly checking the "status" bits.
Fix it by checking the "ext_status" bits.
Signed-off-by: Lei YU
---
drivers/hwmon/occ/sysfs.c | 8
1 file changed, 4 insertions(+), 4 d
is breaks the userspace's phosphor-hwmon.
If we fix the issue by updating the configure files' path in userspace, it
means the userspace only with the new 5.x kernel.
So the question here is, it there a stable way for userspace to match a hwmon
device?
Thanks!
--
BRs,
Lei YU
On Wed, May 9, 2018 at 11:43 AM, Guenter Roeck wrote:
>
> I am not going to accept this change, period. This is not one, it is five
> steps
> backward. If "aspeed_set_clock_source(priv->regmap, 0)" changes the clock
> speed,
> or the clock source, read it later, and attach to the correct clock. If
On Tue, May 8, 2018 at 9:51 PM, Guenter Roeck wrote:
> No mixed C/C++ comments in hwmon drivers.
>
>> aspeed_set_clock_source(priv->regmap, 0);
>> + priv->clk_freq = 2400;
>>
>
>
> Are you saying that clk_get_rate() is wrong ? Anyway, if the DT is bad, it
> should be fixed.
Nope,
The clock source for aspeed pwm is set to 24MHz, so use the hard-coded
clock frequency instead of the one in device tree.
Otherwise, in case of the clock specified in device tree is not 24MHz,
the fan speed will be incorrect.
Signed-off-by: Lei YU
---
drivers/hwmon/aspeed-pwm-tacho.c | 7
Reviewed-by: Lei YU
Thanks for catching this.
On Mon, Dec 4, 2017 at 10:13 AM, Guenter Roeck wrote:
> Smatch reports:
>
> drivers/hwmon/w83773g.c:105
> get_fault() warn: shift has higher precedence than mask
>
> Code analysis shows that the code is indeed wrong.
>
Signed-off-by: Lei YU
---
Documentation/devicetree/bindings/trivial-devices.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.txt
b/Documentation/devicetree/bindings/trivial-devices.txt
index af284fb..63ad2f1 100644
--- a/Documentation
w API devm_hwmon_device_register_with_info()
v4:
- Fix review comments
Lei YU (3):
DT: i2c: W83773G is a trivial device
drivers: hwmon: Add W83773G driver
hwmon: (w83773g) Add documentation
.../devicetree/bindings/trivial-devices.txt| 1 +
Documentation/hwmon/w83773g
Add documentation for the w83773g driver.
Signed-off-by: Lei YU
---
v2:
- Add notes for offset and update_interval
---
Documentation/hwmon/w83773g | 33 +
1 file changed, 33 insertions(+)
create mode 100644 Documentation/hwmon/w83773g
diff --git a
Nuvoton W83773G is a hardware monitor IC providing one local
temperature and two remote temperature sensors.
Signed-off-by: Lei YU
---
v2:
- Rewrite the driver using regmap
- Add offset and update_interval
v3:
- Use devm_hwmon_device_register_with_info() with is_visible/read/write
On Fri, Nov 10, 2017 at 10:49 PM, Guenter Roeck wrote:
> On 11/08/2017 11:09 PM, Lei YU wrote:
>>
>> Nuvoton W83773G is a hardware monitor IC providing one local
>> temperature and two remote temperature sensors.
>>
>> Signed-off-by: Lei YU
>
>
> Nicely
On Thu, Nov 9, 2017 at 1:59 AM, Guenter Roeck wrote:
> On Wed, Nov 08, 2017 at 02:03:34PM +0800, Lei YU wrote:
>> On Tue, Nov 7, 2017 at 10:33 PM, Guenter Roeck wrote:
>> > On 11/07/2017 12:27 AM, Lei YU wrote:
>> >>
>> >> Nuvoton W83773G is
Signed-off-by: Lei YU
---
Documentation/devicetree/bindings/trivial-devices.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.txt
b/Documentation/devicetree/bindings/trivial-devices.txt
index af284fb..63ad2f1 100644
--- a/Documentation
w API devm_hwmon_device_register_with_info()
Lei YU (3):
DT: i2c: W83773G is a trivial device
drivers: hwmon: Add W83773G driver
hwmon: (w83773g) Add documentation
.../devicetree/bindings/trivial-devices.txt| 1 +
Documentation/hwmon/w83773g| 33 ++
drivers/hwmon/Kc
Nuvoton W83773G is a hardware monitor IC providing one local
temperature and two remote temperature sensors.
Signed-off-by: Lei YU
---
v2:
- Rewrite the driver using regmap
- Add offset and update_interval
v3:
- Use devm_hwmon_device_register_with_info() with is_visible/read/write
Add documentation for the w83773g driver.
Signed-off-by: Lei YU
---
v2:
- Add notes for offset and update_interval
---
Documentation/hwmon/w83773g | 33 +
1 file changed, 33 insertions(+)
create mode 100644 Documentation/hwmon/w83773g
diff --git a
On Tue, Nov 7, 2017 at 10:33 PM, Guenter Roeck wrote:
> On 11/07/2017 12:27 AM, Lei YU wrote:
>>
>> Nuvoton W83773G is a hardware monitor IC providing one local
>> temperature and two remote temperature sensors.
>>
>> Signed-off-by: Lei YU
>> ---
>&g
Signed-off-by: Lei YU
---
Documentation/devicetree/bindings/trivial-devices.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.txt
b/Documentation/devicetree/bindings/trivial-devices.txt
index af284fb..63ad2f1 100644
--- a/Documentation
Add documentation for the w83773g driver.
Signed-off-by: Lei YU
---
v2:
- Add notes for offset and update_interval
---
Documentation/hwmon/w83773g | 33 +
1 file changed, 33 insertions(+)
create mode 100644 Documentation/hwmon/w83773g
diff --git a
Nuvoton W83773G is a hardware monitor IC providing one local
temperature and two remote temperature sensors.
Signed-off-by: Lei YU
---
v2:
- Rewrite the driver using regmap
- Add offset and update_interval
---
drivers/hwmon/Kconfig | 10 ++
drivers/hwmon/Makefile | 1 +
drivers/hwmon
Nuvoton W83773G is a hardware monitoring chip, which integrates two remote
and one local temperature sensors.
---
v2:
- The driver is re-written as v1's comment, so the author is changed to me.
- Added the device to trivial-devices.txt
Lei YU (3):
DT: i2c: W83773G is a trivial d
Hi Guenter,
Thanks a lot for the detailed review.
I will try to fix all the comments and send v2 patch.
On Sun, Nov 5, 2017 at 3:30 AM, Guenter Roeck wrote:
> On 11/01/2017 11:33 PM, Lei YU wrote:
>>
>> Nuvoton W83773G is a hardware monitor IC providing one local
>> tempe
On Thu, Nov 2, 2017 at 10:04 PM, Guenter Roeck wrote:
> On 11/01/2017 11:33 PM, Lei YU wrote:
>>
>> Nuvoton W83773G is a hardware monitor IC providing one local
>> temperature and two remote temperature sensors.
>>
> This chip is pretty close to LM90. Have you explo
Add documentation for the w83773g driver.
Signed-off-by: Lei YU
---
Documentation/hwmon/w83773g | 28
1 file changed, 28 insertions(+)
create mode 100644 Documentation/hwmon/w83773g
diff --git a/Documentation/hwmon/w83773g b/Documentation/hwmon/w83773g
new file
Nuvoton W83773G is a hardware monitoring chip, which integrates two remote
and one local temperature sensors.
Lei YU (2):
drivers: hwmon: Add W83773G driver
hwmon: (w83773g) Add documentation
Documentation/hwmon/w83773g | 28 +
drivers/hwmon/Kconfig | 11 ++
drivers/hwmon
Nuvoton W83773G is a hardware monitor IC providing one local
temperature and two remote temperature sensors.
Signed-off-by: Lei YU
---
drivers/hwmon/Kconfig | 11 ++
drivers/hwmon/Makefile | 1 +
drivers/hwmon/w83773g.c | 276
3 files
27 matches
Mail list logo