Re: hwmon driver with misc interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2018-07-08 at 23:37 -0700, Guenter Roeck wrote:
> On 07/08/2018 11:04 PM, Benjamin Herrenschmidt wrote:
> 
> > > Another option would be to handle it through regmap; That nowadays
> > > supports custom accesses implemented in the parent driver (see regmap_read
> > > and regmap_write in struct regmap_config). The child driver gets the
> > > regmap pointer and uses the regmap API. I don't see that as messy.
> > 
> > That works for purely MMIO based things, this isn't though.
> > 
> 
> Sorry, I meant reg_read and reg_write callbacks in struct regmap_config.
> I don't think those callbacks are limited to mmio; I find many other
> access types by browsing through code providing those callbacks.
> 
> Sure, one could consider regmap to be another bloat, but I find it to
> be a quite convenient abstraction layer.

It has been for some things. We use it in some of our drivers.

In the specific case of OCC, it's a bit more complex, we need to send
potentially fairly large "commands" to the SBE via the sbefifo driver
and receive the corresponding response in a buffer, so we have an API
between the drivers, which works well.

Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux