On 4/19/21 10:50 PM, Zev Weiss wrote:
[ ... ]

> I had a glance at the enclosure driver; it looks pretty geared toward 
> SES-like things (drivers/scsi/ses.c being its only usage I can see in the 
> kernel at the moment) and while it could perhaps be pressed into working for 
> this it seems like it would probably drag in a fair amount of boilerplate and 
> result in a somewhat gratuitously confusing driver arrangement (calling the 
> things involved in the cases we're looking at "enclosures" seems like a bit 
> of a stretch).
> 
> As an alternative, would something like the patch below be more along the 
> lines of what you're suggesting?  And if so, would it make sense to 
> generalize it into something like 'pmbus-switch.c' and add a 
> PMBUS_HAVE_POWERSWITCH functionality bit or similar in the pmbus code instead 
> of hardcoding it for only LM25066 support?
> 
> 

No. Don't access pmbus functions from outside drivers/hwmon/pmbus.

I used to be opposed to function export restrictions (aka export namespaces),
but you are making a good case that we need to introduce them for pmbus
functions.

Guenter

Reply via email to