Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "Stefan Wahren" <stefan.wahren@i2se.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Jean Delvare" <jdelvare@suse.com>,
	"Eric Anholt" <eric@anholt.net>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Phil Elwell" <phil@raspberrypi.org>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 3/6] hwmon: Add support for RPi voltage sensor
Date: Wed, 16 May 2018 19:23:35 +0100	[thread overview]
Message-ID: <b332332e-ccf2-2a1d-5c6f-d8cb88c3a212@arm.com> (raw)
In-Reply-To: <20180516180549.GA22705@roeck-us.net>

On 16/05/18 19:05, Guenter Roeck wrote:
> On Wed, May 16, 2018 at 02:51:49PM +0100, Robin Murphy wrote:
>> Hi Stefan,
>>
>> On 16/05/18 14:37, Stefan Wahren wrote:
>>> Currently there is no easy way to detect under-voltage conditions on a remote
>>> Raspberry Pi. This hwmon driver retrieves the state of the under-voltage sensor
>>> via mailbox interface. The handling based on Noralf's modifications to the
>>> downstream firmware driver. In case of an under-voltage condition only an entry
>>> is written to the kernel log.
>>>
>>> CC: "Noralf Trønnes" <noralf@tronnes.org>
>>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>>> ---
>>>   drivers/hwmon/Kconfig             |  10 ++
>>>   drivers/hwmon/Makefile            |   1 +
>>>   drivers/hwmon/raspberrypi-hwmon.c | 207 ++++++++++++++++++++++++++++++++++++++
>>>   3 files changed, 218 insertions(+)
>>>   create mode 100644 drivers/hwmon/raspberrypi-hwmon.c
>>>
>>> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
>>> index 768aed5..7f935cf 100644
>>> --- a/drivers/hwmon/Kconfig
>>> +++ b/drivers/hwmon/Kconfig
>>> @@ -1298,6 +1298,16 @@ config SENSORS_PWM_FAN
>>>   	  This driver can also be built as a module.  If so, the module
>>>   	  will be called pwm-fan.
>>> +config SENSORS_RASPBERRYPI_HWMON
>>> +	tristate "Raspberry Pi voltage monitor"
>>> +	depends on (ARCH_BCM2835 && RASPBERRYPI_FIRMWARE) || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
>>
>> Since RASPBERRYPI_FIRMWARE already implies ARCH_BCM2835 (via BCM2835_MBOX),
>> this is just a very roundabout way to say:
>>
>> 	depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST
>>
> That would permit SENSORS_RASPBERRYPI_HWMON=y combined with
> RASPBERRYPI_FIRMWARE=m, which AFAICS would result in a build error
> because include/soc/bcm2835/raspberrypi-firmware.h uses IS_ENABLED()
> and not IS_REACHABLE().

But that's only possible when COMPILE_TEST=y, where in any case there 
are stub definitions for the #else case in that header which should 
still be enough to build with, right? (and if not, that's probably its 
own bug)

Nobody's expecting COMPILE_TEST configs to actually boot and work 
perfectly, are they?

Robin.

  reply	other threads:[~2018-05-16 18:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 13:37 [PATCH RFC 0/6] hwmon: Add support for Raspberry Pi voltage sensor Stefan Wahren
2018-05-16 13:37 ` [PATCH RFC 1/6] ARM: bcm2835: Add GET_THROTTLED firmware property Stefan Wahren
2018-05-16 13:37 ` [PATCH RFC 2/6] dt-bindings: hwmon: Add Raspberry Pi voltage sensor Stefan Wahren
2018-05-16 14:23   ` Robin Murphy
2018-05-16 17:51     ` Eric Anholt
2018-05-16 14:52   ` Guenter Roeck
2018-05-16 13:37 ` [PATCH RFC 3/6] hwmon: Add support for RPi " Stefan Wahren
2018-05-16 13:51   ` Robin Murphy
2018-05-16 18:05     ` Guenter Roeck
2018-05-16 18:23       ` Robin Murphy [this message]
2018-05-16 18:21   ` Guenter Roeck
2018-05-16 19:59     ` Stefan Wahren
2018-05-17 16:43       ` Guenter Roeck
2018-05-17 17:25         ` Eric Anholt
2018-05-16 13:37 ` [PATCH RFC 4/6] ARM: bcm2835_defconfig: Enable " Stefan Wahren
2018-05-16 13:37 ` [PATCH RFC 5/6] ARM: multi_v7_defconfig: " Stefan Wahren
2018-05-16 13:37 ` [PATCH RFC 6/6] arm64: defconfig: " Stefan Wahren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b332332e-ccf2-2a1d-5c6f-d8cb88c3a212@arm.com \
    --to=robin.murphy@arm.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@roeck-us.net \
    --cc=mark.rutland@arm.com \
    --cc=noralf@tronnes.org \
    --cc=phil@raspberrypi.org \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox