This is really minor, but it improves the readability.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
All definitions should be unique, since they're in the gloabl namespace.
So the prefix LP8727_ are added. Additionally, use BIT() macro for bit
masks. Remove unnecessary definitions such as SW_DM1_U1 and SW_DP2_U2.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Debounce time is configurable in the platform side. If it is not defined,
the default value is 270ms.
Platform data is msec unit, and this time is converted to jiffies
internally. The workqueue uses this jiffies time in the interrupt
handling. So debounce_jiffies is added in the private data.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
LP8727 platform data is optional, so the driver should work even the
platform data is NULL.
To check the platform data, charging parameter data should be changed to
the pointer type.
Fix NULL point access problem when getting the battery properties. When
the data is NULL, just return as invalid value.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
The lp8727 header can be used only in the platform side, so it can be
moved to the platform_data directory.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>