RE: [RFC net-next 15/15] net: lora: Add Semtech SX1301

Ben Whitten
2018-07-04T13:43:58Z

> Subject: Re: [RFC net-next 15/15] net: lora: Add Semtech SX1301
>
> On Tue, Jul 03, 2018 at 06:40:41PM +0200, Andreas Färber wrote:
>
> > Do you have an alternative solution for abstraction? A regmap would seem
> > to require putting everything into a monolithic SX1301 driver despite
> > those connected chipsets actually being regular, external SPI chips that
> > could also be attached to non-SX1301 SPI masters.
>
> I'm suggesting a regmap for those external SPI chips. It doesn't matter
> what the host uses.

Currently in my testing drivers I have used regmap for both the SX1301 and the downstream SX1257.
In my SX1257 driver currently the regmap is backed via SPI with devm_regmap_init_spi, please correct me if I am wrong but if I understand correctly this could be split out to regmap backed by SPI in the case of a direct host connection, and a regmap backed by the SX1301's regmapped strobing register interface, regmap_bus?
Is there a precedent to this I can examine?