Re: [PATCH 05/10] hwmon: generic-pwm-tachometer: Add generic PWM based tachometer

2018-02-21 Thread Guenter Roeck
On 02/20/2018 10:58 PM, Rajkumar Rampelli wrote: Add generic PWM based tachometer driver via HWMON interface to report the RPM of motor. This drivers get the period/duty cycle from PWM IP which captures the motor PWM output. This driver implements a simple interface for monitoring the speed of

Re: [PATCH 05/10] hwmon: generic-pwm-tachometer: Add generic PWM based tachometer

2018-02-21 Thread Guenter Roeck
On 02/20/2018 11:15 PM, Mikko Perttunen wrote: AIUI, the PWM framework already exposes a sysfs node with period information. We should just use that instead of adding a new driver for this. I am kind of lost. Please explain. Are you saying that we should drop the pwm-fan driver as well

Re: [PATCH v2 7/8] [PATCH 7/8] drivers/hwmon: Add a generic PECI hwmon client driver

2018-02-21 Thread Jae Hyun Yoo
On 2/21/2018 4:37 PM, Andrew Lunn wrote: But even with this change, it still needs to use delayed creation because BMC side kernel doesn't know how many DIMMs are populated on a remote server before the remote server completes its memory training and testing in BIOS, but it needs to check the

Re: [PATCH v2 7/8] [PATCH 7/8] drivers/hwmon: Add a generic PECI hwmon client driver

2018-02-21 Thread Andrew Lunn
> But even with this change, it still needs to use delayed creation > because BMC side kernel doesn't know how many DIMMs are populated on > a remote server before the remote server completes its memory > training and testing in BIOS, but it needs to check the remote > server's CPU temperature as

Re: [PATCH v2 1/8] [PATCH 1/8] drivers/peci: Add support for PECI bus driver core

2018-02-21 Thread Greg KH
On Wed, Feb 21, 2018 at 12:42:30PM -0800, Jae Hyun Yoo wrote: > On 2/21/2018 9:58 AM, Greg KH wrote: > > On Wed, Feb 21, 2018 at 08:15:59AM -0800, Jae Hyun Yoo wrote: > > > This commit adds driver implementation for PECI bus into linux > > > driver framework. > > > > > > Signed-off-by: Jae Hyun

[PATCH v2 6/8] [PATCH 6/8] Documentation: hwmon: Add a document for PECI hwmon client driver

2018-02-21 Thread Jae Hyun Yoo
This commit adds a hwmon document for a generic PECI hwmon client driver. Signed-off-by: Jae Hyun Yoo --- Documentation/hwmon/peci-hwmon | 73 ++ 1 file changed, 73 insertions(+) create mode 100644

Re: [PATCH 05/10] hwmon: generic-pwm-tachometer: Add generic PWM based tachometer

2018-02-21 Thread Mikko Perttunen
On 21.02.2018 16:46, Guenter Roeck wrote: On 02/20/2018 11:15 PM, Mikko Perttunen wrote: AIUI, the PWM framework already exposes a sysfs node with period information. We should just use that instead of adding a new driver for this. I am kind of lost. Please explain. Are you saying that we

[PATCH v2 4/8] [PATCH 4/8] drivers/peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx

2018-02-21 Thread Jae Hyun Yoo
This commit adds PECI adapter driver implementation for Aspeed AST24xx/AST25xx. Signed-off-by: Jae Hyun Yoo --- drivers/peci/Kconfig | 19 ++ drivers/peci/Makefile | 3 + drivers/peci/peci-aspeed.c | 510 +

[PATCH v2 7/8] [PATCH 7/8] drivers/hwmon: Add a generic PECI hwmon client driver

2018-02-21 Thread Jae Hyun Yoo
This commit adds a generic PECI hwmon client driver implementation. Signed-off-by: Jae Hyun Yoo --- drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/peci-hwmon.c | 928 + 3 files

[PATCH v2 8/8] [PATCH 8/8] Add a maintainer for the PECI subsystem

2018-02-21 Thread Jae Hyun Yoo
This commit adds a maintainer information for the PECI subsystem. Signed-off-by: Jae Hyun Yoo --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 93a12af4f180..f9c302cbb76b 100644 --- a/MAINTAINERS +++

Re: [PATCH 05/10] hwmon: generic-pwm-tachometer: Add generic PWM based tachometer

2018-02-21 Thread Guenter Roeck
On Wed, Feb 21, 2018 at 05:20:29PM +0200, Mikko Perttunen wrote: > On 21.02.2018 16:46, Guenter Roeck wrote: > >On 02/20/2018 11:15 PM, Mikko Perttunen wrote: > >>AIUI, the PWM framework already exposes a sysfs node with period > >>information. We should just use that instead of adding a new

[PATCH v2 1/8] [PATCH 1/8] drivers/peci: Add support for PECI bus driver core

2018-02-21 Thread Jae Hyun Yoo
This commit adds driver implementation for PECI bus into linux driver framework. Signed-off-by: Jae Hyun Yoo --- drivers/Kconfig |2 + drivers/Makefile|1 + drivers/peci/Kconfig| 20 + drivers/peci/Makefile

[PATCH v2 0/8] PECI device driver introduction

2018-02-21 Thread Jae Hyun Yoo
Introduction of the Platform Environment Control Interface (PECI) bus device driver. PECI is a one-wire bus interface that provides a communication channel between Intel processor and chipset components to external monitoring or control devices. PECI is designed to support the following sideband

[PATCH v2 2/8] [PATCH 2/8] Documentations: dt-bindings: Add a document of PECI adapter driver for Aspeed AST24xx/25xx SoCs

2018-02-21 Thread Jae Hyun Yoo
This commit adds a dt-bindings document of PECI adapter driver for Aspeed AST24xx/25xx SoCs. Signed-off-by: Jae Hyun Yoo --- .../devicetree/bindings/peci/peci-aspeed.txt | 73 ++ 1 file changed, 73 insertions(+) create mode 100644

Re: [PATCH v2 1/8] [PATCH 1/8] drivers/peci: Add support for PECI bus driver core

2018-02-21 Thread Andrew Lunn
> +static int peci_locked_xfer(struct peci_adapter *adapter, > + struct peci_xfer_msg *msg, > + bool do_retry, > + bool has_aw_fcs) > +{ > + ktime_t start, end; > + s64 elapsed_ms; > + int rc = 0; > + > + if

Re: [PATCH v2 1/8] [PATCH 1/8] drivers/peci: Add support for PECI bus driver core

2018-02-21 Thread Greg KH
On Wed, Feb 21, 2018 at 08:15:59AM -0800, Jae Hyun Yoo wrote: > This commit adds driver implementation for PECI bus into linux > driver framework. > > Signed-off-by: Jae Hyun Yoo > --- Why is there no other Intel developers willing to review and sign off on this

Re: [PATCH v2 7/8] [PATCH 7/8] drivers/hwmon: Add a generic PECI hwmon client driver

2018-02-21 Thread Guenter Roeck
On Wed, Feb 21, 2018 at 08:16:05AM -0800, Jae Hyun Yoo wrote: > This commit adds a generic PECI hwmon client driver implementation. > > Signed-off-by: Jae Hyun Yoo > --- > drivers/hwmon/Kconfig | 10 + > drivers/hwmon/Makefile | 1 + >

[PATCH 4/4] hwmon: (nct6775) Add support for NCT6796D

2018-02-21 Thread Guenter Roeck
NCT6796D is mostly compatible to NCT6795D. It supports an additional pwm control and fan speed channel. While we are at it, update documentation for NCT6795D. Signed-off-by: Guenter Roeck --- Documentation/hwmon/nct6775 | 56 --- drivers/hwmon/Kconfig |

[PATCH 1/4] hwmon: (nct6775) Use NUM_FAN consistently

2018-02-21 Thread Guenter Roeck
The size of some of the arrays using the number of fans is hardcoded. Use NUM_FAN consistently throughout the driver. Signed-off-by: Guenter Roeck --- drivers/hwmon/nct6775.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 2/4] hwmon: (nct6775) Improve fan6/pwm6 support

2018-02-21 Thread Guenter Roeck
Improve fan6/pwm6 detection on NCT6795D. Add support for fan pulses for fans 4..6 and fan min limits for fan6. Signed-off-by: Guenter Roeck --- drivers/hwmon/nct6775.c | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git

[PATCH 3/4] hwmon: (nct6775) Initialize boolean variables with declaration

2018-02-21 Thread Guenter Roeck
Initialize boolean flags in nct6775_check_fan_inputs() while declaring them instead of several times throughout the code. Signed-off-by: Guenter Roeck --- drivers/hwmon/nct6775.c | 28 1 file changed, 4 insertions(+), 24 deletions(-) diff --git

Re: [PATCH v2 1/8] [PATCH 1/8] drivers/peci: Add support for PECI bus driver core

2018-02-21 Thread Jae Hyun Yoo
Hi Andrew, Thanks for sharing your time to review it. Please check my answers inline. On 2/21/2018 9:04 AM, Andrew Lunn wrote: +static int peci_locked_xfer(struct peci_adapter *adapter, + struct peci_xfer_msg *msg, + bool do_retry, +

Re: [PATCH v2 1/8] [PATCH 1/8] drivers/peci: Add support for PECI bus driver core

2018-02-21 Thread Jae Hyun Yoo
On 2/21/2018 9:58 AM, Greg KH wrote: On Wed, Feb 21, 2018 at 08:15:59AM -0800, Jae Hyun Yoo wrote: This commit adds driver implementation for PECI bus into linux driver framework. Signed-off-by: Jae Hyun Yoo --- Why is there no other Intel developers willing to

Re: [PATCH v2 7/8] [PATCH 7/8] drivers/hwmon: Add a generic PECI hwmon client driver

2018-02-21 Thread Guenter Roeck
On Wed, Feb 21, 2018 at 01:24:48PM -0800, Jae Hyun Yoo wrote: > Hi Guenter, > > Thanks for sharing your time to review this code. Please check my answers > inline. > > On 2/21/2018 10:26 AM, Guenter Roeck wrote: > >On Wed, Feb 21, 2018 at 08:16:05AM -0800, Jae Hyun Yoo wrote: > >>This commit

Re: [PATCH v2 1/8] [PATCH 1/8] drivers/peci: Add support for PECI bus driver core

2018-02-21 Thread Andrew Lunn
> >Is there a real need to do transfers in atomic context, or with > >interrupts disabled? > > > > Actually, no. Generally, this function will be called in sleep-able context > so this code is for an exceptional case handling. > > I'll rewrite this code like below: > if (in_atomic() ||