power: supply: smb347-charger: Implement device-tree support
authorDavid Heidelberg <david@ixit.cz>
Thu, 13 Aug 2020 21:34:04 +0000 (00:34 +0300)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 25 Aug 2020 17:29:18 +0000 (19:29 +0200)
commit364bec7557ecff4ef959c536abd19d00d94a854d
tree7b1fee5c6f124b99d08790d621839de6094f8bf4
parent00cda13e339c9f4956a6f036675df2ca5b5a552e
power: supply: smb347-charger: Implement device-tree support

This patch adds device-tree support to the SMB347 charger driver. All
legacy platform data now can be parsed from DT. Because of that and since
SMB347 is an I2C client driver, the IRQ number can be passed automatically
through client's IRQ variable if it's defined in DT. There is no need to
map GPIO to IRQ manually in the case of DT.

This patch is based on the original work made by:
Jonghwa Lee <jonghwa3.lee@samsung.com>
Link: https://patchwork.kernel.org/patch/4284731/
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/smb347-charger.c