Message ID | 20200121160114.60007-1-mika.westerberg@linux.intel.com (mailing list archive) |
---|---|
Headers | show |
Series | platform/x86: Rework intel_scu_ipc and intel_pmc_ipc drivers | expand |
On Tue, Jan 21, 2020 at 07:00:36PM +0300, Mika Westerberg wrote: > Currently both intel_scu_ipc.c and intel_pmc_ipc.c implement the same SCU > IPC communications with minor differences. This duplication does not make > much sense so this series reworks the two drivers so that there is only a > single implementation of the SCU IPC. In addition to that the API will be This is a 40 (!) patch series and looking at the subjects and diffstat I can't tell if there's something in particular that you're looking for me to review?
On Tue, Jan 21, 2020 at 04:21:57PM +0000, Mark Brown wrote: > On Tue, Jan 21, 2020 at 07:00:36PM +0300, Mika Westerberg wrote: > > > Currently both intel_scu_ipc.c and intel_pmc_ipc.c implement the same SCU > > IPC communications with minor differences. This duplication does not make > > much sense so this series reworks the two drivers so that there is only a > > single implementation of the SCU IPC. In addition to that the API will be > > This is a 40 (!) patch series and looking at the subjects and diffstat I > can't tell if there's something in particular that you're looking for me > to review? Sorry about that. I included you because there was suggestion from Lee to convert the MFD driver in patch 37 to use regmap but the registers are all 64-bit and it was not clear whether regmap supports that: https://www.spinics.net/lists/platform-driver-x86/msg20652.html Looking at the regmap API it seems to deal mostly with "unsigned int" which does not work well with the 64-bit MMIO registers but I may be missing something.
On Tue, Jan 21, 2020 at 06:33:12PM +0200, Mika Westerberg wrote: > Sorry about that. I included you because there was suggestion from Lee > to convert the MFD driver in patch 37 to use regmap but the registers > are all 64-bit and it was not clear whether regmap supports that: > https://www.spinics.net/lists/platform-driver-x86/msg20652.html > Looking at the regmap API it seems to deal mostly with "unsigned int" > which does not work well with the 64-bit MMIO registers but I may be > missing something. It should work fine on architectures with 64 bit ints but otherwise it's not supported (and doing so would hurt the API pretty badly so I'm not sure it would make sense but patches welcome).
On Tue, Jan 21, 2020 at 04:45:15PM +0000, Mark Brown wrote: > On Tue, Jan 21, 2020 at 06:33:12PM +0200, Mika Westerberg wrote: > > > Sorry about that. I included you because there was suggestion from Lee > > to convert the MFD driver in patch 37 to use regmap but the registers > > are all 64-bit and it was not clear whether regmap supports that: > > > https://www.spinics.net/lists/platform-driver-x86/msg20652.html > > > Looking at the regmap API it seems to deal mostly with "unsigned int" > > which does not work well with the 64-bit MMIO registers but I may be > > missing something. > > It should work fine on architectures with 64 bit ints but otherwise it's > not supported (and doing so would hurt the API pretty badly so I'm not > sure it would make sense but patches welcome). OK, thanks for the clarification. I guess in this case we can probably just live without using it, if that's fine for Lee and others. The new MFD driver itself is ~500 lines so not sure how much regmap would help there, and we only expose two simple functions for the subdevices both dealing with 64-bit registers.
On Tue, Jan 21, 2020 at 07:00:22PM +0200, Mika Westerberg wrote: > OK, thanks for the clarification. I guess in this case we can probably > just live without using it, if that's fine for Lee and others. The new > MFD driver itself is ~500 lines so not sure how much regmap would help > there, and we only expose two simple functions for the subdevices both > dealing with 64-bit registers. The usual motivation is all the diagnostic infrastructure you get with regmap - tracepoints for I/O and the ability to dump the register map in debugfs mainly.
On Tue, Jan 21, 2020 at 05:06:56PM +0000, Mark Brown wrote: > On Tue, Jan 21, 2020 at 07:00:22PM +0200, Mika Westerberg wrote: > > > OK, thanks for the clarification. I guess in this case we can probably > > just live without using it, if that's fine for Lee and others. The new > > MFD driver itself is ~500 lines so not sure how much regmap would help > > there, and we only expose two simple functions for the subdevices both > > dealing with 64-bit registers. > > The usual motivation is all the diagnostic infrastructure you get with > regmap - tracepoints for I/O and the ability to dump the register map in > debugfs mainly. Right. Here we are talking about a "map" of two registers so probably not worth the added trouble ;-)