Message ID | 20221014220540.55570-1-eajames@linux.ibm.com |
---|---|
Headers | show |
Series | fsi: Add regmap and refactor sbefifo | expand |
On Fri, Oct 14, 2022 at 05:05:35PM -0500, Eddie James wrote: > The SBEFIFO hardware can now be attached over a new I2C endpoint > interface called the I2C Responder (I2CR). In order to use the > existing SBEFIFO driver, add regmap drivers for both FSI busses > and the I2CR. Then, refactor the SBEFIFO and OCC drivers to clean > up and use the new regmap drivers. Is there any great reason to provide support in the regmap core for this rather than just implementing in drivers/fsi? AFAICT this is just ending up as an implementation detail of shared code in drivers/fsi and won't have any external users?
On 10/17/22 12:37, Mark Brown wrote: > On Fri, Oct 14, 2022 at 05:05:35PM -0500, Eddie James wrote: >> The SBEFIFO hardware can now be attached over a new I2C endpoint >> interface called the I2C Responder (I2CR). In order to use the >> existing SBEFIFO driver, add regmap drivers for both FSI busses >> and the I2CR. Then, refactor the SBEFIFO and OCC drivers to clean >> up and use the new regmap drivers. > Is there any great reason to provide support in the regmap core for this > rather than just implementing in drivers/fsi? AFAICT this is just > ending up as an implementation detail of shared code in drivers/fsi and > won't have any external users? One reason is to have a common interface with the new FSI regmap. That way abstracting out the bus transfer is trivial in the new SBEFIFO driver, assuming the SBEFIFO driver should switch to use the FSI regmap. But you are correct, I doubt anyone else will use this. I suppose SBEFIFO may as well not use the regmap and just use some callbacks for whichever bus transfer... Thanks, Eddie
On Tue, Oct 18, 2022 at 09:02:33AM -0500, Eddie James wrote: > On 10/17/22 12:37, Mark Brown wrote: > > Is there any great reason to provide support in the regmap core for this > > rather than just implementing in drivers/fsi? AFAICT this is just > > ending up as an implementation detail of shared code in drivers/fsi and > > won't have any external users? > One reason is to have a common interface with the new FSI regmap. That way > abstracting out the bus transfer is trivial in the new SBEFIFO driver, > assuming the SBEFIFO driver should switch to use the FSI regmap. > But you are correct, I doubt anyone else will use this. I suppose SBEFIFO > may as well not use the regmap and just use some callbacks for whichever bus > transfer... I'm not saying don't use regmap, I'm saying why not just do this in the driver - you can just as easily set the reg_read() and reg_write() callbacks in an individual driver without needing to create a new regmap bus type for just that one driver to use.
On Wed, 19 Oct 2022, at 04:30, Mark Brown wrote: > On Tue, Oct 18, 2022 at 09:02:33AM -0500, Eddie James wrote: >> On 10/17/22 12:37, Mark Brown wrote: > >> > Is there any great reason to provide support in the regmap core for this >> > rather than just implementing in drivers/fsi? AFAICT this is just >> > ending up as an implementation detail of shared code in drivers/fsi and >> > won't have any external users? > >> One reason is to have a common interface with the new FSI regmap. That way >> abstracting out the bus transfer is trivial in the new SBEFIFO driver, >> assuming the SBEFIFO driver should switch to use the FSI regmap. > >> But you are correct, I doubt anyone else will use this. I suppose SBEFIFO >> may as well not use the regmap and just use some callbacks for whichever bus >> transfer... > > I'm not saying don't use regmap, I'm saying why not just do this in the > driver - you can just as easily set the reg_read() and reg_write() > callbacks in an individual driver without needing to create a new regmap > bus type for just that one driver to use. +1
On 10/18/22 13:00, Mark Brown wrote: > On Tue, Oct 18, 2022 at 09:02:33AM -0500, Eddie James wrote: >> On 10/17/22 12:37, Mark Brown wrote: >>> Is there any great reason to provide support in the regmap core for this >>> rather than just implementing in drivers/fsi? AFAICT this is just >>> ending up as an implementation detail of shared code in drivers/fsi and >>> won't have any external users? >> One reason is to have a common interface with the new FSI regmap. That way >> abstracting out the bus transfer is trivial in the new SBEFIFO driver, >> assuming the SBEFIFO driver should switch to use the FSI regmap. >> But you are correct, I doubt anyone else will use this. I suppose SBEFIFO >> may as well not use the regmap and just use some callbacks for whichever bus >> transfer... > I'm not saying don't use regmap, I'm saying why not just do this in the > driver - you can just as easily set the reg_read() and reg_write() > callbacks in an individual driver without needing to create a new regmap > bus type for just that one driver to use. I understand. That sounds like a good approach then, I'll work on that for v2. Thanks, Eddie