mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v9 00/12] rk808: Add RK805 support
@ 2017-08-09  2:10 Joseph Chen
  2017-08-09  2:10 ` [PATCH v9 01/12] mfd: rk808: fix up the chip id get failed Joseph Chen
  2017-08-09  9:35 ` [PATCH v9 00/12] rk808: Add RK805 support Heiko Stuebner
  0 siblings, 2 replies; 5+ messages in thread
From: Joseph Chen @ 2017-08-09  2:10 UTC (permalink / raw)
  To: gnurou, linus.walleij, dmitry.torokhov
  Cc: huangtao, devicetree, linux-gpio, broonie, zhangqing,
	linux-kernel, robh+dt, lgirdwood, linux-rockchip, wdc, tony.xie,
	linux-input, mark.rutland, w.egorov, Joseph Chen

change in v9:
PATCH V9 1/12:  (1) fix spelling issue: s/Chip/chip/
		(2) add: Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
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 <chenjh@rock-chips.com>
PATCH V8 2/12: add: Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
PATCH V8 3/12: add: Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
PATCH V8 4/12: add: Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
PATCH V8 5/12: add: Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
PATCH V8 6/12: add: Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
PATCH V8 7/12: add: Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
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 <linus.walleij@linaro.org>	
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 <linus.walleij@linaro.org>

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 <broonie@kernel.org>
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 <robh@kernel.org>
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v9 01/12] mfd: rk808: fix up the chip id get failed
  2017-08-09  2:10 [PATCH v9 00/12] rk808: Add RK805 support Joseph Chen
@ 2017-08-09  2:10 ` Joseph Chen
  2017-08-09  9:35 ` [PATCH v9 00/12] rk808: Add RK805 support Heiko Stuebner
  1 sibling, 0 replies; 5+ messages in thread
From: Joseph Chen @ 2017-08-09  2:10 UTC (permalink / raw)
  To: gnurou, linus.walleij, dmitry.torokhov
  Cc: huangtao, devicetree, linux-gpio, broonie, zhangqing,
	linux-kernel, robh+dt, lgirdwood, linux-rockchip, wdc, tony.xie,
	linux-input, mark.rutland, w.egorov, Joseph Chen

From: Elaine Zhang <zhangqing@rock-chips.com>

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

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
---
 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v9 00/12] rk808: Add RK805 support
  2017-08-09  2:10 [PATCH v9 00/12] rk808: Add RK805 support Joseph Chen
  2017-08-09  2:10 ` [PATCH v9 01/12] mfd: rk808: fix up the chip id get failed Joseph Chen
@ 2017-08-09  9:35 ` Heiko Stuebner
  2017-08-09  9:43   ` Joseph Chen
  1 sibling, 1 reply; 5+ messages in thread
From: Heiko Stuebner @ 2017-08-09  9:35 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Joseph Chen, gnurou, linus.walleij, dmitry.torokhov, huangtao,
	devicetree, tony.xie, zhangqing, linux-kernel, robh+dt,
	lgirdwood, linux-gpio, wdc, broonie, linux-input, mark.rutland,
	w.egorov

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 <lee.jones@linaro.org>
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v9 00/12] rk808: Add RK805 support
  2017-08-09  9:35 ` [PATCH v9 00/12] rk808: Add RK805 support Heiko Stuebner
@ 2017-08-09  9:43   ` Joseph Chen
  0 siblings, 0 replies; 5+ messages in thread
From: Joseph Chen @ 2017-08-09  9:43 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: gnurou, linus.walleij, dmitry.torokhov, huangtao, devicetree,
	tony.xie, zhangqing, linux-kernel, robh+dt, lgirdwood,
	linux-gpio, wdc, broonie, linux-input, mark.rutland, w.egorov



在 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 <lee.jones@linaro.org>
>> 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)
E-mail:chenjh@rock-chips.com
福州瑞芯微电子股份有限公司
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v9 01/12] mfd: rk808: fix up the chip id get failed
  2017-08-09 10:04 Joseph Chen
@ 2017-08-09 10:04 ` Joseph Chen
  0 siblings, 0 replies; 5+ messages in thread
From: Joseph Chen @ 2017-08-09 10:04 UTC (permalink / raw)
  To: gnurou, linus.walleij, dmitry.torokhov
  Cc: huangtao, devicetree, linux-gpio, broonie, zhangqing,
	linux-kernel, robh+dt, lgirdwood, linux-rockchip, wdc, tony.xie,
	linux-input, mark.rutland, w.egorov, Joseph Chen

From: Elaine Zhang <zhangqing@rock-chips.com>

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

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
---
 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-09 10:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-09  2:10 [PATCH v9 00/12] rk808: Add RK805 support Joseph Chen
2017-08-09  2:10 ` [PATCH v9 01/12] mfd: rk808: fix up the chip id get failed Joseph Chen
2017-08-09  9:35 ` [PATCH v9 00/12] rk808: Add RK805 support Heiko Stuebner
2017-08-09  9:43   ` Joseph Chen
2017-08-09 10:04 Joseph Chen
2017-08-09 10:04 ` [PATCH v9 01/12] mfd: rk808: fix up the chip id get failed Joseph Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®