summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>2020-05-28 11:33:18 +0200
committerWolfram Sang <wsa@kernel.org>2020-05-30 23:02:22 +0200
commit0daede80f870025141cbb16e6a826d5e7f43f4a5 (patch)
tree668a5fd899c4c73173d1da8a1919528d0133ac79 /security
parenti2c: designware: Discard Cherry Trail model flag (diff)
downloadlinux-0daede80f870025141cbb16e6a826d5e7f43f4a5.tar.xz
linux-0daede80f870025141cbb16e6a826d5e7f43f4a5.zip
i2c: designware: Convert driver to using regmap API
Seeing the DW I2C driver is using flags-based accessors with two conditional clauses it would be better to replace them with the regmap API IO methods and to initialize the regmap object with read/write callbacks specific to the controller registers map implementation. This will be also handy for the drivers with non-standard registers mapping (like an embedded into the Baikal-T1 System Controller DW I2C block, which glue-driver is a part of this series). As before the driver tries to detect the mapping setup at probe stage and creates a regmap object accordingly, which will be used by the rest of the code to correctly access the controller registers. In two places it was appropriate to convert the hand-written read-modify-write and read-poll-loop design patterns to the corresponding regmap API ready-to-use methods. Note the regmap IO methods return value is checked only at the probe stage. The rest of the code won't do this because basically we have MMIO-based regmap so non of the read/write methods can fail (this also won't be needed for the Baikal-T1-specific I2C controller). Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> [wsa: fix type of 'rx_valid' and remove outdated kdoc var description] Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions