From: Chris Morgan <macroalpha82@gmail.com> To: linux-pm@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, maccraft123mc@gmail.com, sre@kernel.org, heiko@sntech.de, robh+dt@kernel.org, lee.jones@linaro.org, pgwipeout@gmail.com, Chris Morgan <macromorgan@hotmail.com> Subject: [PATCH v3 0/4] power: supply: Add Support for RK817 Charger Date: Mon, 9 Aug 2021 21:54:32 -0500 [thread overview] Message-ID: <20210810025436.23367-1-macroalpha82@gmail.com> (raw) From: Chris Morgan <macromorgan@hotmail.com> This series is to add support for the Rockchip rk817 battery charger which is present in all Rockchip RK817 PMICs. The driver was written as a joint effort by Maya Matuszczyk <maccraft123mc@gmail.com> and myself Chris Morgan <macromorgan@hotmail.com>. The driver requires some basic parameters be described about the battery in the devicetree such as the maximum capacity, the minimum and maximum voltage for the battery, the maximum charge current, the maximum charge voltage, and the value of sample resistors and sleep currents. The hardware itself contains an ADC capable of measuring the voltage, current, and temperature of the battery (though my implementation of an Odroid Go Advance lacks a thermistor for temperature). It also contains a columb counter, registers for tracking the measured voltage and current at boot, and a few bytes of nvram for storing data. Changes from V2: - Updated devicetree bindings to use common property units. - Removed unneeded includes. - Updated rk817_chg_cur_to_reg to make more legible. - Simplified formula for displaying calibrated voltage. - Updated power supply type to POWER_SUPPLY_TYPE_USB. - Implemented get/put_unaligned macros for bulk reads and writes. - Changed numerous dev_err() to dev_err_probe(). - Call power_supply_put_battery_info() at end of probe function. - Removed unneeded whitespace. Changes from V1: - Fixed a CLANG warning regarding an uninitalized variable. - Fixed a CLANG warning regarding a pointer as a bool value always returning as true. - Added Maya Matuszczyk to the Signed-off-by. Chris Morgan (4): dt-bindings: Add Rockchip rk817 battery charger support mfd: Add Rockchip rk817 battery charger support power: supply: Add charger driver for Rockchip RK817 arm64: dts: rockchip: add rk817 charger to Odroid Go Advance .../devicetree/bindings/mfd/rk808.txt | 36 +- .../boot/dts/rockchip/rk3326-odroid-go2.dts | 26 + drivers/mfd/rk808.c | 16 +- drivers/power/supply/Kconfig | 6 + drivers/power/supply/Makefile | 1 + drivers/power/supply/rk817_charger.c | 922 ++++++++++++++++++ include/linux/mfd/rk808.h | 87 ++ 7 files changed, 1092 insertions(+), 2 deletions(-) create mode 100644 drivers/power/supply/rk817_charger.c -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Chris Morgan <macroalpha82@gmail.com> To: linux-pm@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, maccraft123mc@gmail.com, sre@kernel.org, heiko@sntech.de, robh+dt@kernel.org, lee.jones@linaro.org, pgwipeout@gmail.com, Chris Morgan <macromorgan@hotmail.com> Subject: [PATCH v3 0/4] power: supply: Add Support for RK817 Charger Date: Mon, 9 Aug 2021 21:54:32 -0500 [thread overview] Message-ID: <20210810025436.23367-1-macroalpha82@gmail.com> (raw) From: Chris Morgan <macromorgan@hotmail.com> This series is to add support for the Rockchip rk817 battery charger which is present in all Rockchip RK817 PMICs. The driver was written as a joint effort by Maya Matuszczyk <maccraft123mc@gmail.com> and myself Chris Morgan <macromorgan@hotmail.com>. The driver requires some basic parameters be described about the battery in the devicetree such as the maximum capacity, the minimum and maximum voltage for the battery, the maximum charge current, the maximum charge voltage, and the value of sample resistors and sleep currents. The hardware itself contains an ADC capable of measuring the voltage, current, and temperature of the battery (though my implementation of an Odroid Go Advance lacks a thermistor for temperature). It also contains a columb counter, registers for tracking the measured voltage and current at boot, and a few bytes of nvram for storing data. Changes from V2: - Updated devicetree bindings to use common property units. - Removed unneeded includes. - Updated rk817_chg_cur_to_reg to make more legible. - Simplified formula for displaying calibrated voltage. - Updated power supply type to POWER_SUPPLY_TYPE_USB. - Implemented get/put_unaligned macros for bulk reads and writes. - Changed numerous dev_err() to dev_err_probe(). - Call power_supply_put_battery_info() at end of probe function. - Removed unneeded whitespace. Changes from V1: - Fixed a CLANG warning regarding an uninitalized variable. - Fixed a CLANG warning regarding a pointer as a bool value always returning as true. - Added Maya Matuszczyk to the Signed-off-by. Chris Morgan (4): dt-bindings: Add Rockchip rk817 battery charger support mfd: Add Rockchip rk817 battery charger support power: supply: Add charger driver for Rockchip RK817 arm64: dts: rockchip: add rk817 charger to Odroid Go Advance .../devicetree/bindings/mfd/rk808.txt | 36 +- .../boot/dts/rockchip/rk3326-odroid-go2.dts | 26 + drivers/mfd/rk808.c | 16 +- drivers/power/supply/Kconfig | 6 + drivers/power/supply/Makefile | 1 + drivers/power/supply/rk817_charger.c | 922 ++++++++++++++++++ include/linux/mfd/rk808.h | 87 ++ 7 files changed, 1092 insertions(+), 2 deletions(-) create mode 100644 drivers/power/supply/rk817_charger.c -- 2.25.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
next reply other threads:[~2021-08-10 2:54 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-10 2:54 Chris Morgan [this message] 2021-08-10 2:54 ` [PATCH v3 0/4] power: supply: Add Support for RK817 Charger Chris Morgan 2021-08-10 2:54 ` [PATCH v3 1/4] dt-bindings: Add Rockchip rk817 battery charger support Chris Morgan 2021-08-10 2:54 ` Chris Morgan 2021-08-17 19:11 ` Rob Herring 2021-08-17 19:11 ` Rob Herring 2021-08-18 15:03 ` Chris Morgan 2021-08-10 2:54 ` [PATCH v3 2/4] mfd: " Chris Morgan 2021-08-10 2:54 ` Chris Morgan 2021-08-10 2:54 ` [PATCH v3 3/4] power: supply: Add charger driver for Rockchip RK817 Chris Morgan 2021-08-10 2:54 ` Chris Morgan 2021-08-10 2:54 ` [PATCH v3 4/4] arm64: dts: rockchip: add rk817 charger to Odroid Go Advance Chris Morgan 2021-08-10 2:54 ` Chris Morgan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210810025436.23367-1-macroalpha82@gmail.com \ --to=macroalpha82@gmail.com \ --cc=devicetree@vger.kernel.org \ --cc=heiko@sntech.de \ --cc=lee.jones@linaro.org \ --cc=linux-pm@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=maccraft123mc@gmail.com \ --cc=macromorgan@hotmail.com \ --cc=pgwipeout@gmail.com \ --cc=robh+dt@kernel.org \ --cc=sre@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.