2017-08-09 02:11:39

by Joseph Chen

[permalink] [raw]
Subject: [PATCH v9 00/12] rk808: Add RK805 support

change in v9:
PATCH V9 1/12: (1) fix spelling issue: s/Chip/chip/
(2) add: Acked-for-MFD-by: Lee Jones <[email protected]>
PATCH V9 2/12 ~ 12/12: they are applied and no changes, so I don't resend them.

change in v8:
PATCH V8 1/12: add: Signed-off-by: Joseph Chen <[email protected]>
PATCH V8 2/12: add: Signed-off-by: Joseph Chen <[email protected]>
PATCH V8 3/12: add: Signed-off-by: Joseph Chen <[email protected]>
PATCH V8 4/12: add: Signed-off-by: Joseph Chen <[email protected]>
PATCH V8 5/12: add: Signed-off-by: Joseph Chen <[email protected]>
PATCH V8 6/12: add: Signed-off-by: Joseph Chen <[email protected]>
PATCH V8 7/12: add: Signed-off-by: Joseph Chen <[email protected]>
PATCH V8 8/12: (1) Kconfig: update coding style
(2) pinctrl-rk805.c: using #include <linux/gpio/driver.h>
(3) pinctrl-rk805.c: inline data and open code it; remove FUNCTION_GROUP and PINGROUP macros definition
PATCH V8 9/12: NO change in V8
PATCH V8 10/12: apply tag: Acked-by: Linus Walleij <[email protected]>
PATCH V8 11/12: NO change in V8
PATCH V8 12/12: (1) using semicolon after "output-high"
(2) apply tag: Acked-by: Linus Walleij <[email protected]>

change in v7:
PATCH V7 1/12: NO change in V7
PATCH V7 2/12: NO change in V7
PATCH V7 3/12: fix missing: Acked-by: Mark Brown <[email protected]>
PATCH V7 4/12: NO change in V7
PATCH V7 5/12: NO change in V7
PATCH V7 6/12: NO change in V7
PATCH V7 7/12: fix missing: Acked-by: Rob Herring <[email protected]>
PATCH V7 8/12: abandon drivers/gpio/gpio-rk805.c and add drivers/pinctrl/pinctrl-rk805.c
PATCH V7 9/12: reset author and signed off with my english name
reset MODULE_AUTHOR() with my english name
replace devm_request_threaded_irq() with devm_request_any_context_irq()
PATCH V7 10/12: replace 'gpio-rk805' with 'pinctrl-rk805' in struct mfd_cell rk805s[]
PATCH V7 11/12: NO change in V7
PATCH V7 12/12: dt-bindings: abandon gpio-rk805.txt and add pinctrl-rk805.txt

change in v6:
patch1~7 no changed in V6.
add patch 8~12 for gpio and powerkey func for rk805.

change in v5:
PATCH V5 1/7: NO change in V5
PATCH V5 2/7: fix the rk805 reg addr in numerical order
PATCH V5 3/7: NO change in V5
PATCH V5 4/7: fix up the rk805_device_shutdown func
PATCH V5 5/7: NO change in V5
PATCH V5 6/7: NO change in V5
PATCH V5 7/7: fix up the description of the rk805

change in v4:
PATCH V4 1/7: NO change in V4
PATCH V4 2/7: rename the commit message
PATCH V4 3/7: NO change in V4
PATCH V4 4/7: Split this patch up into subsystems patch 5/7 6/7
PATCH V4 5/7: new added
PATCH V4 6/7: new added
PATCH V4 7/7: NO change in V4


change in V3:
PATCH V3 1/5: NO change in V3
PATCH V3 2/5: add rk805 RTC INT MASK define
PATCH V3 3/5: RK805 set suspend enable and disable is different from rk808
use rk805_regs_ops and rk805_switch_ops
PATCH V3 4/5: fix up the shutdown func
use pm_shutdown_prepare_fn to prepare shutdown
and pm_pwroff_fn pull down gpio to shut down rk805
it will update in the future(after rk808 support gpio func)
PATCH V3 5/5: NO change in V3

change in V2:
PATCH V2 1/5: NO change in V2
PATCH V2 2/5: add rk805 BUCK ILMAX define
PATCH V2 3/5: NO change in V2
PATCH V2 4/5: setting RK805 BUCK ILMAX in pre init
PATCH V2 5/5: Add RK805 device tree bindings document

Elaine Zhang (7):
mfd: rk808: fix up the chip id get failed
mfd: rk808: add rk805 regs addr and ID
regulator: rk808: Add regulator driver for RK805
mfd: rk808: Add RK805 support
clk: Kconfig: Name RK805 in Kconfig for COMMON_CLK_RK808
rtc: Kconfig: Name RK805 in Kconfig for RTC_DRV_RK808
mfd: dt-bindings: Add RK805 device tree bindings document

Joseph Chen (5):
pinctrl: Add pinctrl driver for the RK805 PMIC
Input: Add power key driver for Rockchip RK805 PMIC
mfd: rk808: Add RK805 pinctrl support
mfd: rk808: Add RK805 power key support
pinctrl: dt-bindings: add bindings for Rockchip RK805 PMIC

Documentation/devicetree/bindings/mfd/rk808.txt | 22 +-
.../devicetree/bindings/pinctrl/pinctrl-rk805.txt | 63 +++
drivers/clk/Kconfig | 4 +-
drivers/input/misc/Kconfig | 6 +
drivers/input/misc/Makefile | 1 +
drivers/input/misc/rk805-pwrkey.c | 111 +++++
drivers/mfd/Kconfig | 4 +-
drivers/mfd/rk808.c | 147 +++++-
drivers/pinctrl/Kconfig | 9 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/pinctrl-rk805.c | 493 +++++++++++++++++++++
drivers/regulator/Kconfig | 4 +-
drivers/regulator/rk808-regulator.c | 130 ++++++
drivers/rtc/Kconfig | 4 +-
include/linux/mfd/rk808.h | 121 +++++
15 files changed, 1105 insertions(+), 15 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-rk805.txt
create mode 100644 drivers/input/misc/rk805-pwrkey.c
create mode 100644 drivers/pinctrl/pinctrl-rk805.c

--
1.9.1



2017-08-09 02:11:44

by Joseph Chen

[permalink] [raw]
Subject: [PATCH v9 01/12] mfd: rk808: fix up the chip id get failed

From: Elaine Zhang <[email protected]>

the rk8xx chip id is:
((MSB << 8) | LSB) & 0xfff0

Signed-off-by: Elaine Zhang <[email protected]>
Signed-off-by: Joseph Chen <[email protected]>
Acked-for-MFD-by: Lee Jones <[email protected]>
---
drivers/mfd/rk808.c | 21 +++++++++++++++------
include/linux/mfd/rk808.h | 1 +
2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index fd087cb..8e60eba 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -325,7 +325,7 @@ static int rk808_probe(struct i2c_client *client,
void (*pm_pwroff_fn)(void);
int nr_pre_init_regs;
int nr_cells;
- int pm_off = 0;
+ int pm_off = 0, msb, lsb;
int ret;
int i;

@@ -333,14 +333,23 @@ static int rk808_probe(struct i2c_client *client,
if (!rk808)
return -ENOMEM;

- rk808->variant = i2c_smbus_read_word_data(client, RK808_ID_MSB);
- if (rk808->variant < 0) {
- dev_err(&client->dev, "Failed to read the chip id at 0x%02x\n",
+ /* Read chip variant */
+ msb = i2c_smbus_read_byte_data(client, RK808_ID_MSB);
+ if (msb < 0) {
+ dev_err(&client->dev, "failed to read the chip id at 0x%x\n",
RK808_ID_MSB);
- return rk808->variant;
+ return msb;
}

- dev_dbg(&client->dev, "Chip id: 0x%x\n", (unsigned int)rk808->variant);
+ lsb = i2c_smbus_read_byte_data(client, RK808_ID_LSB);
+ if (lsb < 0) {
+ dev_err(&client->dev, "failed to read the chip id at 0x%x\n",
+ RK808_ID_LSB);
+ return lsb;
+ }
+
+ rk808->variant = ((msb << 8) | lsb) & RK8XX_ID_MSK;
+ dev_info(&client->dev, "chip id: 0x%x\n", (unsigned int)rk808->variant);

switch (rk808->variant) {
case RK808_ID:
diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
index 83701ef..54feb14 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -298,6 +298,7 @@ enum rk818_reg {
#define VOUT_LO_INT BIT(0)
#define CLK32KOUT2_EN BIT(0)

+#define RK8XX_ID_MSK 0xfff0
enum {
BUCK_ILMIN_50MA,
BUCK_ILMIN_100MA,
--
1.9.1


2017-08-09 09:36:11

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH v9 00/12] rk808: Add RK805 support

Hi Joseph,

Am Mittwoch, 9. August 2017, 10:10:41 CEST schrieb Joseph Chen:
> change in v9:
> PATCH V9 1/12: (1) fix spelling issue: s/Chip/chip/
> (2) add: Acked-for-MFD-by: Lee Jones <[email protected]>
> PATCH V9 2/12 ~ 12/12: they are applied and no changes, so I don't resend them.

I don't know Lee's workflow, but I'm not sure that is actually true.

I.e. he added "for his own reference" Acked-for-MFD-by: tags to the
patches, but did not apply them (and therefore you cannot find them on [0])

So I'd think you might need to send everything again?


Heiko

[0] https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/log/?h=for-mfd-next

2017-08-09 09:41:31

by Joseph Chen

[permalink] [raw]
Subject: Re: [PATCH v9 00/12] rk808: Add RK805 support



?? 2017/8/9 17:35, Heiko Stuebner д??:
> Hi Joseph,
>
> Am Mittwoch, 9. August 2017, 10:10:41 CEST schrieb Joseph Chen:
>> change in v9:
>> PATCH V9 1/12: (1) fix spelling issue: s/Chip/chip/
>> (2) add: Acked-for-MFD-by: Lee Jones <[email protected]>
>> PATCH V9 2/12 ~ 12/12: they are applied and no changes, so I don't resend them.
> I don't know Lee's workflow, but I'm not sure that is actually true.
>
> I.e. he added "for his own reference" Acked-for-MFD-by: tags to the
> patches, but did not apply them (and therefore you cannot find them on [0])
>
> So I'd think you might need to send everything again?
>
>
> Heiko
>
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/log/?h=for-mfd-next
>

Ok, I think it's my misunderstanding, I will send everything later.:-)

--
Best Regards
----------------------------------------------------------------------------
?½??? (Joseph Chen)
[email protected]
??????о΢???ӹɷ????޹?˾
Fuzhou Rockchip Electronics Co.Ltd
????ʡ??????ͭ??·????????89??????԰A??21??¥ (350003)
No. 21 Building, A District, No.89,software Boulevard Fuzhou,Fujian,PRC
TEL??0591-83991906/07-8573