Message ID | 2083c9d6e96a72f9c1324c8a277acfd780a34094.1498472593.git.baolin.wang@spreadtrum.com |
---|---|
State | Not Applicable, archived |
Headers | show |
On Mon, Jun 26, 2017 at 5:28 AM, Baolin Wang <baolin.wang@spreadtrum.com> wrote: > This patch adds the binding documentation for Spreadtrum I2C > controller device. > > Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com> > --- > Changes since v2: > - Change compatible strings to be SoC specific. > > Changes since v1: > - No updates. > --- > Documentation/devicetree/bindings/i2c/i2c-sprd.txt | 31 ++++++++++++++++++++ > 1 file changed, 31 insertions(+) > create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sprd.txt Acked-by: Rob Herring <robh@kernel.org> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 一, 6月 26, 2017 at 09:05:39上午 -0500, Rob Herring wrote: > On Mon, Jun 26, 2017 at 5:28 AM, Baolin Wang <baolin.wang@spreadtrum.com> wrote: > > This patch adds the binding documentation for Spreadtrum I2C > > controller device. > > > > Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com> > > --- > > Changes since v2: > > - Change compatible strings to be SoC specific. > > > > Changes since v1: > > - No updates. > > --- > > Documentation/devicetree/bindings/i2c/i2c-sprd.txt | 31 ++++++++++++++++++++ > > 1 file changed, 31 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sprd.txt > > Acked-by: Rob Herring <robh@kernel.org> Thanks Rob. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Andy and Wolfram, On 一, 6月 26, 2017 at 06:28:14下午 +0800, Baolin Wang wrote: > This patch adds the I2C controller driver for Spreadtrum SC9860 platform. > > Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com> > --- > Changes since v2: > - Remove some redundant comments and parens. > - Define macros instead of magic number. > - Add some comments to explain clock formula. > - Change of_clk_get_by_name() to devm_clk_get(). > - Deal with other frequency. > - Change register definiton to low case. > - Change is_last_msg to boolean. > - Other optimization. > > Changes sice v1: > - Power on I2C device in probe(). > - Remove redundant macros and usb __maybe_unused. > - Remove redundant 'of_match_ptr'. > - Modify return values and check the return value for 'clk_prepare_enable'. > --- Do you have any more comments about this patch? Thanks. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Baolin, On 26 June 2017 at 18:28, Baolin Wang <baolin.wang@spreadtrum.com> wrote: > This patch adds the I2C controller driver for Spreadtrum SC9860 platform. > > Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com> > --- > Changes since v2: > - Remove some redundant comments and parens. > - Define macros instead of magic number. > - Add some comments to explain clock formula. > - Change of_clk_get_by_name() to devm_clk_get(). > - Deal with other frequency. > - Change register definiton to low case. > - Change is_last_msg to boolean. > - Other optimization. > > Changes sice v1: > - Power on I2C device in probe(). > - Remove redundant macros and usb __maybe_unused. > - Remove redundant 'of_match_ptr'. > - Modify return values and check the return value for 'clk_prepare_enable'. > --- > drivers/i2c/busses/Kconfig | 7 + > drivers/i2c/busses/Makefile | 1 + > drivers/i2c/busses/i2c-sprd.c | 683 +++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 691 insertions(+) > create mode 100644 drivers/i2c/busses/i2c-sprd.c > [snip] > diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c > new file mode 100644 > index 0000000..a070f61 > --- /dev/null > +++ b/drivers/i2c/busses/i2c-sprd.c > @@ -0,0 +1,683 @@ > +/* > + * Copyright (C) 2017 Spreadtrum Communications Inc. > + * > + * This software is licensed under the terms of the GNU General Public > + * License version 2, as published by the Free Software Foundation, and > + * may be copied, distributed, and modified under those terms. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ According to RobH's comments [1], we're switching to use SPDX-License-Identifier tag instead, like [2]. [1] http://lkml.iu.edu/hypermail/linux/kernel/1702.2/05122.html [2] http://elixir.free-electrons.com/linux/v4.12/source/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts#L6 Thanks, Chunyan -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Chunyan, On 一, 7月 03, 2017 at 05:29:57下午 +0800, Chunyan Zhang wrote: > Hi Baolin, > > On 26 June 2017 at 18:28, Baolin Wang <baolin.wang@spreadtrum.com> wrote: > > This patch adds the I2C controller driver for Spreadtrum SC9860 platform. > > > > Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com> > > --- > > Changes since v2: > > - Remove some redundant comments and parens. > > - Define macros instead of magic number. > > - Add some comments to explain clock formula. > > - Change of_clk_get_by_name() to devm_clk_get(). > > - Deal with other frequency. > > - Change register definiton to low case. > > - Change is_last_msg to boolean. > > - Other optimization. > > > > Changes sice v1: > > - Power on I2C device in probe(). > > - Remove redundant macros and usb __maybe_unused. > > - Remove redundant 'of_match_ptr'. > > - Modify return values and check the return value for 'clk_prepare_enable'. > > --- > > drivers/i2c/busses/Kconfig | 7 + > > drivers/i2c/busses/Makefile | 1 + > > drivers/i2c/busses/i2c-sprd.c | 683 +++++++++++++++++++++++++++++++++++++++++ > > 3 files changed, 691 insertions(+) > > create mode 100644 drivers/i2c/busses/i2c-sprd.c > > > > [snip] > > > diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c > > new file mode 100644 > > index 0000000..a070f61 > > --- /dev/null > > +++ b/drivers/i2c/busses/i2c-sprd.c > > @@ -0,0 +1,683 @@ > > +/* > > + * Copyright (C) 2017 Spreadtrum Communications Inc. > > + * > > + * This software is licensed under the terms of the GNU General Public > > + * License version 2, as published by the Free Software Foundation, and > > + * may be copied, distributed, and modified under those terms. > > + * > > + * This program is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + * GNU General Public License for more details. > > + */ > > According to RobH's comments [1], we're switching to use > SPDX-License-Identifier tag instead, like [2]. > > [1] http://lkml.iu.edu/hypermail/linux/kernel/1702.2/05122.html > [2] http://elixir.free-electrons.com/linux/v4.12/source/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts#L6 Will use SPDX-License-Identifier tag instead and resend. Thanks. > > Thanks, > Chunyan -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sprd.txt b/Documentation/devicetree/bindings/i2c/i2c-sprd.txt new file mode 100644 index 0000000..60b7cda --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-sprd.txt @@ -0,0 +1,31 @@ +I2C for Spreadtrum platforms + +Required properties: +- compatible: Should be "sprd,sc9860-i2c". +- reg: Specify the physical base address of the controller and length + of memory mapped region. +- interrupts: Should contain I2C interrupt. +- clock-names: Should contain following entries: + "i2c" for I2C clock, + "source" for I2C source (parent) clock, + "enable" for I2C module enable clock. +- clocks: Should contain a clock specifier for each entry in clock-names. +- clock-frequency: Constains desired I2C bus clock frequency in Hz. +- #address-cells: Should be 1 to describe address cells for I2C device address. +- #size-cells: Should be 0 means no size cell for I2C device address. + +Optional properties: +- Child nodes conforming to I2C bus binding + +Examples: +i2c0: i2c@70500000 { + compatible = "sprd,sc9860-i2c"; + reg = <0 0x70500000 0 0x1000>; + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "i2c", "source", "enable"; + clocks = <&clk_i2c3>, <&ext_26m>, <&clk_ap_apb_gates 11>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; +}; +
This patch adds the binding documentation for Spreadtrum I2C controller device. Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com> --- Changes since v2: - Change compatible strings to be SoC specific. Changes since v1: - No updates. --- Documentation/devicetree/bindings/i2c/i2c-sprd.txt | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sprd.txt