mbox series

[v3,0/2] hwmon: Add StarFive JH7100 temperature sensor

Message ID 20210726171802.1052716-1-kernel@esmil.dk (mailing list archive)
Headers show
Series hwmon: Add StarFive JH7100 temperature sensor | expand

Message

Emil Renner Berthing July 26, 2021, 5:18 p.m. UTC
This adds a driver for the temperature sensor on the JH7100, a RISC-V
SoC by StarFive Technology Co. Ltd., and most likely also the upcoming
JH7110 version.

The SoC is used on the BeagleV Starlight board:
https://github.com/beagleboard/beaglev-starlight

Support for this SoC is not yet upstreamed, but is actively worked on,
so it should only be a matter of time before that happens.

v3:
* Handle timeouts from wait_for_completion_interruptible_timeout
  properly.

v2:
* Fix checkpatch.pl --strict warnings
  - Add myself to MAINTAINERS
  - Fix multiline comments
  - Use proper case and whitespace for #defines
  - Add comment to sfctemp::lock mutex.
* Remaining comments by Guenter Roeck
  - Add Documentation/hwmon/sfctemp.rst
  - Use devm_add_action() and devm_hwmon_device_register_with_info()
    instead of a driver .remove function.
  - Don't do test conversion at probe time.
  - #include <linux/io.h>
  - Remove unused #defines
  - Use int return variable in sfctemp_convert().
* Add Samin's Signed-off-by to patch 2/2

Emil Renner Berthing (2):
  dt-bindings: hwmon: add starfive,jh7100-temp bindings
  hwmon: (sfctemp) Add StarFive JH7100 temperature sensor

 .../bindings/hwmon/starfive,jh7100-temp.yaml  |  43 +++
 Documentation/hwmon/index.rst                 |   1 +
 Documentation/hwmon/sfctemp.rst               |  32 ++
 MAINTAINERS                                   |   8 +
 drivers/hwmon/Kconfig                         |  10 +
 drivers/hwmon/Makefile                        |   1 +
 drivers/hwmon/sfctemp.c                       | 291 ++++++++++++++++++
 7 files changed, 386 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/starfive,jh7100-temp.yaml
 create mode 100644 Documentation/hwmon/sfctemp.rst
 create mode 100644 drivers/hwmon/sfctemp.c

Comments

Guenter Roeck July 28, 2021, 4:54 p.m. UTC | #1
On 7/26/21 10:18 AM, Emil Renner Berthing wrote:
> This adds a driver for the temperature sensor on the JH7100, a RISC-V
> SoC by StarFive Technology Co. Ltd., and most likely also the upcoming
> JH7110 version.
> 
> The SoC is used on the BeagleV Starlight board:
> https://github.com/beagleboard/beaglev-starlight
> 
> Support for this SoC is not yet upstreamed, but is actively worked on,
> so it should only be a matter of time before that happens.
> 

Hmm, makes me wonder if I should apply the series now or later,
when the chip is actually supported by the kernel. Comments/thoughts ?

Guenter

> v3:
> * Handle timeouts from wait_for_completion_interruptible_timeout
>    properly.
> 
> v2:
> * Fix checkpatch.pl --strict warnings
>    - Add myself to MAINTAINERS
>    - Fix multiline comments
>    - Use proper case and whitespace for #defines
>    - Add comment to sfctemp::lock mutex.
> * Remaining comments by Guenter Roeck
>    - Add Documentation/hwmon/sfctemp.rst
>    - Use devm_add_action() and devm_hwmon_device_register_with_info()
>      instead of a driver .remove function.
>    - Don't do test conversion at probe time.
>    - #include <linux/io.h>
>    - Remove unused #defines
>    - Use int return variable in sfctemp_convert().
> * Add Samin's Signed-off-by to patch 2/2
> 
> Emil Renner Berthing (2):
>    dt-bindings: hwmon: add starfive,jh7100-temp bindings
>    hwmon: (sfctemp) Add StarFive JH7100 temperature sensor
> 
>   .../bindings/hwmon/starfive,jh7100-temp.yaml  |  43 +++
>   Documentation/hwmon/index.rst                 |   1 +
>   Documentation/hwmon/sfctemp.rst               |  32 ++
>   MAINTAINERS                                   |   8 +
>   drivers/hwmon/Kconfig                         |  10 +
>   drivers/hwmon/Makefile                        |   1 +
>   drivers/hwmon/sfctemp.c                       | 291 ++++++++++++++++++
>   7 files changed, 386 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/hwmon/starfive,jh7100-temp.yaml
>   create mode 100644 Documentation/hwmon/sfctemp.rst
>   create mode 100644 drivers/hwmon/sfctemp.c
>
Emil Renner Berthing July 28, 2021, 5:05 p.m. UTC | #2
On Wed, 28 Jul 2021 at 18:54, Guenter Roeck <linux@roeck-us.net> wrote:
> On 7/26/21 10:18 AM, Emil Renner Berthing wrote:
> > This adds a driver for the temperature sensor on the JH7100, a RISC-V
> > SoC by StarFive Technology Co. Ltd., and most likely also the upcoming
> > JH7110 version.
> >
> > The SoC is used on the BeagleV Starlight board:
> > https://github.com/beagleboard/beaglev-starlight
> >
> > Support for this SoC is not yet upstreamed, but is actively worked on,
> > so it should only be a matter of time before that happens.
> >
>
> Hmm, makes me wonder if I should apply the series now or later,
> when the chip is actually supported by the kernel. Comments/thoughts ?
>
> Guenter

I'd of course love if it was applied now. That would at least mean
fewer patches to rebase when keeping the beaglev patches [1] up to
date, and I'd be very surprised if SoC support doesn't make it
upstream eventually. But I'd also fully understand the position that
this only makes sense to add when support for the SoC is upstream too.
I'm adding Drew, as he might have something to say about this.

[1]: https://github.com/starfive-tech/linux/tree/beaglev

/Emil

> > v3:
> > * Handle timeouts from wait_for_completion_interruptible_timeout
> >    properly.
> >
> > v2:
> > * Fix checkpatch.pl --strict warnings
> >    - Add myself to MAINTAINERS
> >    - Fix multiline comments
> >    - Use proper case and whitespace for #defines
> >    - Add comment to sfctemp::lock mutex.
> > * Remaining comments by Guenter Roeck
> >    - Add Documentation/hwmon/sfctemp.rst
> >    - Use devm_add_action() and devm_hwmon_device_register_with_info()
> >      instead of a driver .remove function.
> >    - Don't do test conversion at probe time.
> >    - #include <linux/io.h>
> >    - Remove unused #defines
> >    - Use int return variable in sfctemp_convert().
> > * Add Samin's Signed-off-by to patch 2/2
> >
> > Emil Renner Berthing (2):
> >    dt-bindings: hwmon: add starfive,jh7100-temp bindings
> >    hwmon: (sfctemp) Add StarFive JH7100 temperature sensor
> >
> >   .../bindings/hwmon/starfive,jh7100-temp.yaml  |  43 +++
> >   Documentation/hwmon/index.rst                 |   1 +
> >   Documentation/hwmon/sfctemp.rst               |  32 ++
> >   MAINTAINERS                                   |   8 +
> >   drivers/hwmon/Kconfig                         |  10 +
> >   drivers/hwmon/Makefile                        |   1 +
> >   drivers/hwmon/sfctemp.c                       | 291 ++++++++++++++++++
> >   7 files changed, 386 insertions(+)
> >   create mode 100644 Documentation/devicetree/bindings/hwmon/starfive,jh7100-temp.yaml
> >   create mode 100644 Documentation/hwmon/sfctemp.rst
> >   create mode 100644 drivers/hwmon/sfctemp.c
> >
>
Emil Renner Berthing Aug. 1, 2021, 8:19 p.m. UTC | #3
On Wed, 28 Jul 2021 at 19:05, Emil Renner Berthing <kernel@esmil.dk> wrote:
> On Wed, 28 Jul 2021 at 18:54, Guenter Roeck <linux@roeck-us.net> wrote:
> > On 7/26/21 10:18 AM, Emil Renner Berthing wrote:
> > > This adds a driver for the temperature sensor on the JH7100, a RISC-V
> > > SoC by StarFive Technology Co. Ltd., and most likely also the upcoming
> > > JH7110 version.
> > >
> > > The SoC is used on the BeagleV Starlight board:
> > > https://github.com/beagleboard/beaglev-starlight
> > >
> > > Support for this SoC is not yet upstreamed, but is actively worked on,
> > > so it should only be a matter of time before that happens.
> > >
> >
> > Hmm, makes me wonder if I should apply the series now or later,
> > when the chip is actually supported by the kernel. Comments/thoughts ?
> >
> > Guenter
>
> I'd of course love if it was applied now. That would at least mean
> fewer patches to rebase when keeping the beaglev patches [1] up to
> date, and I'd be very surprised if SoC support doesn't make it
> upstream eventually. But I'd also fully understand the position that
> this only makes sense to add when support for the SoC is upstream too.
> I'm adding Drew, as he might have something to say about this.

Hi Guenter,

Things have changed. The BeagleBoard.org foundation is no longer
planning to make any further boards using the JH7100 or upcoming
JH7110 SoCs from StarFive. I still think support for the JH7100 will
make it upstream eventually, but I'm no longer confident enough to
recommend merging this before there are more concrete plans for the
SoC. So thanks for the reviews. I'll repost it when I think it's time
to consider it for upstream again.

/Emil
Guenter Roeck Aug. 1, 2021, 8:29 p.m. UTC | #4
On 8/1/21 1:19 PM, Emil Renner Berthing wrote:
> On Wed, 28 Jul 2021 at 19:05, Emil Renner Berthing <kernel@esmil.dk> wrote:
>> On Wed, 28 Jul 2021 at 18:54, Guenter Roeck <linux@roeck-us.net> wrote:
>>> On 7/26/21 10:18 AM, Emil Renner Berthing wrote:
>>>> This adds a driver for the temperature sensor on the JH7100, a RISC-V
>>>> SoC by StarFive Technology Co. Ltd., and most likely also the upcoming
>>>> JH7110 version.
>>>>
>>>> The SoC is used on the BeagleV Starlight board:
>>>> https://github.com/beagleboard/beaglev-starlight
>>>>
>>>> Support for this SoC is not yet upstreamed, but is actively worked on,
>>>> so it should only be a matter of time before that happens.
>>>>
>>>
>>> Hmm, makes me wonder if I should apply the series now or later,
>>> when the chip is actually supported by the kernel. Comments/thoughts ?
>>>
>>> Guenter
>>
>> I'd of course love if it was applied now. That would at least mean
>> fewer patches to rebase when keeping the beaglev patches [1] up to
>> date, and I'd be very surprised if SoC support doesn't make it
>> upstream eventually. But I'd also fully understand the position that
>> this only makes sense to add when support for the SoC is upstream too.
>> I'm adding Drew, as he might have something to say about this.
> 
> Hi Guenter,
> 
> Things have changed. The BeagleBoard.org foundation is no longer
> planning to make any further boards using the JH7100 or upcoming
> JH7110 SoCs from StarFive. I still think support for the JH7100 will
> make it upstream eventually, but I'm no longer confident enough to
> recommend merging this before there are more concrete plans for the
> SoC. So thanks for the reviews. I'll repost it when I think it's time
> to consider it for upstream again.
> 

Thanks for the update.

Guenter