Driver directory selection for Power Supply Status chip
Hi,
The Arria10 System Resource chip (A10SR) is a SPI based MFD implementing a GPIO expander, reset controller, and power supply monitoring. I'm not sure where the driver for the A10SR power monitoring driver should reside and I'm hoping someone can offer some advice.
I'd originally submitted the RFC to the HWMON list but the maintainer pointed out that it wasn't a good fit because the A10SR only indicates boolean power supply status - not the voltage level as required by HWMON.
I read that IIO acts as a bridge between IO and HWMON but I'm also not sure this fits those drivers (although I did find some power supply supervistors there). It isn't quite a power supply supervisor - the A10SR is a comparator instead of an Analog-to-Digital Converter.
One additional thing, the A10SR also had a number of enable bits for enabling devices external to Altera's SoC (but still on the development board). These don't quite fit into the reset controller framework but would seem to fit a MISC directory driver better.
If neither IIO or MISC is a good fit, can someone suggest a more appropriate place?
Thank you for your help,
Thor
Quoted 16 lines · Thor Thayer
Hi,
The Arria10 System Resource chip (A10SR) is a SPI based MFD implementing a GPIO expander, reset controller, and power supply monitoring. I'm not sure where the driver for the A10SR power monitoring driver should reside and I'm hoping someone can offer some advice.
I'd originally submitted the RFC to the HWMON list but the maintainer pointed out that it wasn't a good fit because the A10SR only indicates boolean power supply status - not the voltage level as required by HWMON.
I read that IIO acts as a bridge between IO and HWMON but I'm also not sure this fits those drivers (although I did find some power supply supervistors there). It isn't quite a power supply supervisor - the A10SR is a comparator instead of an Analog-to-Digital Converter.
Quoted 7 lines
One additional thing, the A10SR also had a number of enable bits for enabling devices external to Altera's SoC (but still on the development board). These don't quite fit into the reset controller framework but would seem to fit a MISC directory driver better.
If neither IIO or MISC is a good fit, can someone suggest a more appropriate place?
How does the device work, does it generate an interrupt when the voltage level goes below the threshold? I'd like to pass the ball back and say that this sounds like something that should go into hwmon.
Quoted 22 lines · Lars-Peter Clausen
Quoted 21 lines · Thor Thayer
Hi,
The Arria10 System Resource chip (A10SR) is a SPI based MFD implementing a GPIO expander, reset controller, and power supply monitoring. I'm not sure where the driver for the A10SR power monitoring driver should reside and I'm hoping someone can offer some advice.
I'd originally submitted the RFC to the HWMON list but the maintainer pointed out that it wasn't a good fit because the A10SR only indicates boolean power supply status - not the voltage level as required by HWMON.
I read that IIO acts as a bridge between IO and HWMON but I'm also not sure this fits those drivers (although I did find some power supply supervistors there). It isn't quite a power supply supervisor - the A10SR is a comparator instead of an Analog-to-Digital Converter.
One additional thing, the A10SR also had a number of enable bits for enabling devices external to Altera's SoC (but still on the development board). These don't quite fit into the reset controller framework but would seem to fit a MISC directory driver better.
Quoted 7 lines
Quoted 2 lines
If neither IIO or MISC is a good fit, can someone suggest a more appropriate place?
How does the device work, does it generate an interrupt when the voltage level goes below the threshold? I'd like to pass the ball back and say that this sounds like something that should go into hwmon.
Good question but no, there is no interrupt.
The chip is actually a power supply sequencer for bringing up the power supplies in the correct order. Since the sequence, timings, and thresholds are hard coded in the chip and can't be changed programatically, I assume it was decided that a power fail interrupt was not needed. However, the status of the power (OK/Fail) can be read from the chip.
I was directed to look at Documentation/hwmon/sysfs-interface which states the units are in millivolts and I didn't see any references to a boolean output so I'm leaning away from hwmon.
Thank you for your reply!
Jonathan Cameron
maintainerQuoted 42 lines · Thor Thayer
Quoted 22 lines · Lars-Peter Clausen
Quoted 21 lines · Thor Thayer
Hi,
The Arria10 System Resource chip (A10SR) is a SPI based MFD implementing a GPIO expander, reset controller, and power supply monitoring. I'm not sure where the driver for the A10SR power monitoring driver should reside and I'm hoping someone can offer some advice.
I'd originally submitted the RFC to the HWMON list but the maintainer pointed out that it wasn't a good fit because the A10SR only indicates boolean power supply status - not the voltage level as required by HWMON.
I read that IIO acts as a bridge between IO and HWMON but I'm also not sure this fits those drivers (although I did find some power supply supervistors there). It isn't quite a power supply supervisor - the A10SR is a comparator instead of an Analog-to-Digital Converter.
One additional thing, the A10SR also had a number of enable bits for enabling devices external to Altera's SoC (but still on the development board). These don't quite fit into the reset controller framework but would seem to fit a MISC directory driver better.
Quoted 7 lines
Quoted 2 lines
If neither IIO or MISC is a good fit, can someone suggest a more appropriate place?
How does the device work, does it generate an interrupt when the voltage level goes below the threshold? I'd like to pass the ball back and say that this sounds like something that should go into hwmon.
Good question but no, there is no interrupt.
The chip is actually a power supply sequencer for bringing up the power supplies in the correct order. Since the sequence, timings, and thresholds are hard coded in the chip and can't be changed programatically, I assume it was decided that a power fail interrupt was not needed. However, the status of the power (OK/Fail) can be read from the chip.
Quoted 3 lines
I was directed to look at
Documentation/hwmon/sysfs-interfacewhich states the units are in millivolts and I didn't see any references to a boolean output so I'm leaning away from hwmon.
That's one impressively uninformative output... Hmm. Not obvious where to put it - it doesn't fit in IIO really either.
Could report as a power supply? There is 'health' support in there. See Documentation/power/power_supply_class.txt
and include/linux/power_supply.h
though I'm not sure which type a fail on this would count as... perhaps UNSPEC_FAILURE.
It's intended for batteries really - not sure how far you can stretch that.
Cc'd linux-pm and maintainers. Perhaps they will have a better idea!
Quoted 6 lines
Thank you for your reply!
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 43 lines · Jonathan Cameron
Quoted 42 lines · Thor Thayer
Quoted 22 lines · Lars-Peter Clausen
Quoted 21 lines · Thor Thayer
Hi,
The Arria10 System Resource chip (A10SR) is a SPI based MFD implementing a GPIO expander, reset controller, and power supply monitoring. I'm not sure where the driver for the A10SR power monitoring driver should reside and I'm hoping someone can offer some advice.
I'd originally submitted the RFC to the HWMON list but the maintainer pointed out that it wasn't a good fit because the A10SR only indicates boolean power supply status - not the voltage level as required by HWMON.
I read that IIO acts as a bridge between IO and HWMON but I'm also not sure this fits those drivers (although I did find some power supply supervistors there). It isn't quite a power supply supervisor - the A10SR is a comparator instead of an Analog-to-Digital Converter.
One additional thing, the A10SR also had a number of enable bits for enabling devices external to Altera's SoC (but still on the development board). These don't quite fit into the reset controller framework but would seem to fit a MISC directory driver better.
Quoted 7 lines
Quoted 2 lines
If neither IIO or MISC is a good fit, can someone suggest a more appropriate place?
How does the device work, does it generate an interrupt when the voltage level goes below the threshold? I'd like to pass the ball back and say that this sounds like something that should go into hwmon.
Good question but no, there is no interrupt.
The chip is actually a power supply sequencer for bringing up the power supplies in the correct order. Since the sequence, timings, and thresholds are hard coded in the chip and can't be changed programatically, I assume it was decided that a power fail interrupt was not needed. However, the status of the power (OK/Fail) can be read from the chip.
Quoted 4 lines
Quoted 3 lines
I was directed to look at
Documentation/hwmon/sysfs-interfacewhich states the units are in millivolts and I didn't see any references to a boolean output so I'm leaning away from hwmon.That's one impressively uninformative output... Hmm.
Please clarify what you mean with "impressively uninformative output".
FWIW, hwmon alarm attributes are boolean.
Thanks,
Guenter
Quoted 19 lines
Not obvious where to put it - it doesn't fit in IIO really either.
Could report as a power supply? There is 'health' support in there. See
Documentation/power/power_supply_class.txt
andinclude/linux/power_supply.h
though I'm not sure which type a fail on this would count as... perhapsUNSPEC_FAILURE.It's intended for batteries really - not sure how far you can stretch that.
Cc'd linux-pm and maintainers. Perhaps they will have a better idea!
Quoted 6 lines
Thank you for your reply!
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Guenter,
Quoted 47 lines · Guenter Roeck
Quoted 46 lines · Jonathan Cameron
Quoted 45 lines · Thor Thayer
Quoted 22 lines · Lars-Peter Clausen
Quoted 21 lines · Thor Thayer
Hi,
The Arria10 System Resource chip (A10SR) is a SPI based MFD implementing a GPIO expander, reset controller, and power supply monitoring. I'm not sure where the driver for the A10SR power monitoring driver should reside and I'm hoping someone can offer some advice.
I'd originally submitted the RFC to the HWMON list but the maintainer pointed out that it wasn't a good fit because the A10SR only indicates boolean power supply status - not the voltage level as required by HWMON.
I read that IIO acts as a bridge between IO and HWMON but I'm also not sure this fits those drivers (although I did find some power supply supervistors there). It isn't quite a power supply supervisor - the A10SR is a comparator instead of an Analog-to-Digital Converter.
One additional thing, the A10SR also had a number of enable bits for enabling devices external to Altera's SoC (but still on the development board). These don't quite fit into the reset controller framework but would seem to fit a MISC directory driver better.
Quoted 7 lines
Quoted 2 lines
If neither IIO or MISC is a good fit, can someone suggest a more appropriate place?
How does the device work, does it generate an interrupt when the voltage level goes below the threshold? I'd like to pass the ball back and say that this sounds like something that should go into hwmon.
Good question but no, there is no interrupt.
The chip is actually a power supply sequencer for bringing up the power supplies in the correct order. Since the sequence, timings, and thresholds are hard coded in the chip and can't be changed programatically, I assume it was decided that a power fail interrupt was not needed. However, the status of the power (OK/Fail) can be read from the chip.
I was directed to look at
Documentation/hwmon/sysfs-interfacewhich states the units are in millivolts and I didn't see any references to a boolean output so I'm leaning away from hwmon.
Quoted 9 lines
Quoted 1 line
That's one impressively uninformative output... Hmm.
Please clarify what you mean with "impressively uninformative output".
FWIW, hwmon alarm attributes are boolean.
Thanks,
Guenter
Thank you for pointing out the alarms - I missed that but they would fit. I'll investigate further.
Thanks!
Quoted 19 lines
Quoted 19 lines
Not obvious where to put it - it doesn't fit in IIO really either.
Could report as a power supply? There is 'health' support in there. See
Documentation/power/power_supply_class.txt
andinclude/linux/power_supply.h
though I'm not sure which type a fail on this would count as... perhapsUNSPEC_FAILURE.It's intended for batteries really - not sure how far you can stretch that.
Cc'd linux-pm and maintainers. Perhaps they will have a better idea!
Quoted 6 lines
Thank you for your reply!
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 57 lines · Guenter Roeck
Quoted 8 lines · Jonathan Cameron
Quoted 7 lines · Thor Thayer
Quoted 4 lines · Lars-Peter Clausen
Quoted 3 lines · Thor Thayer
Hi,
The Arria10 System Resource chip (A10SR) is a SPI based MFD
implementing a
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
GPIO expander, reset controller, and power supply monitoring. I'm
not sure
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
where the driver for the A10SR power monitoring driver should
reside and I'm
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
hoping someone can offer some advice.
I'd originally submitted the RFC to the HWMON list but the
maintainer
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
pointed out that it wasn't a good fit because the A10SR only
indicates
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
boolean power supply status - not the voltage level as required
by HWMON.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I read that IIO acts as a bridge between IO and HWMON but I'm
also not sure
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
this fits those drivers (although I did find some power supply
supervistors
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
there). It isn't quite a power supply supervisor - the A10SR is a
comparator
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
instead of an Analog-to-Digital Converter.
One additional thing, the A10SR also had a number of enable bits
for
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
enabling devices external to Altera's SoC (but still on the
development
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
board). These don't quite fit into the reset controller framework
but would
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
seem to fit a MISC directory driver better.
If neither IIO or MISC is a good fit, can someone suggest a more
appropriate
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
place?
How does the device work, does it generate an interrupt when the
voltage
Quoted 1 line
Quoted 1 line
Quoted 1 line
level goes below the threshold? I'd like to pass the ball back and
say that
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
this sounds like something that should go into hwmon.
Good question but no, there is no interrupt.
The chip is actually a power supply sequencer for bringing up the power supplies in the correct order. Since the sequence, timings,
and
Quoted 2 lines
Quoted 2 lines
thresholds are hard coded in the chip and can't be changed programatically, I assume it was decided that a power fail
Quoted 9 lines
interrupt
Quoted 5 lines
Quoted 5 lines
was not needed. However, the status of the power (OK/Fail) can be read from the chip.
I was directed to look at
Documentation/hwmon/sysfs-interfacewhich states the units are in millivolts and I didn't see any referencesto
Quoted 2 lines
Quoted 1 line
a boolean output so I'm leaning away from hwmon.
That's one impressively uninformative output... Hmm.
It's not an alarm on anything in particular but rather simply means 'something is wrong somewhere in the power supply startup'.
Quoted 32 lines
Please clarify what you mean with "impressively uninformative output".
FWIW, hwmon alarm attributes are boolean.
Thanks,
GuenterQuoted 8 lines
Not obvious where to put it - it doesn't fit in IIO really either.
Could report as a power supply? There is 'health' support in there. See
Documentation/power/power_supply_class.txt
andinclude/linux/power_supply.h
though I'm not sure which type a fail on this would count as... perhapsUNSPEC_FAILURE.Quoted 8 lines
It's intended for batteries really - not sure how far you can stretch that.
Cc'd linux-pm and maintainers. Perhaps they will have a better idea!
Quoted 4 lines
Thank you for your reply!
Signature · 1 line
To unsubscribe from this list: send the line "unsubscribelinux-iio" in
Quoted 3 lines
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.