Loading Documentation/devicetree/bindings/nfc/nfc-nci.txt +16 −13 Original line number Diff line number Diff line Loading @@ -10,23 +10,26 @@ Required properties: - qcom,irq-gpio: specific gpio for read interrupt. - qcom,clk-src: nfc clock source ("BBCLK2", "RFCLK3", "GPCLK", ...) - qcom,clk-en-gpio: msm gpio clock,used ony if clock source is msm gpio - vlogic-supply: LDO for power supply - interrupt-parent: Should be phandle for the interrupt controller that services interrupts for this device. - interrupts: should contain the NFC interrupt. NFC has one read interrupt. - qcom,clk-gpio: pmic gpio on which bbclk2 signal is coming. Example: LDO example: i2c@f9925000 { /* BLSP1 QUP3 */ nfc-nci@0e { i2c@f9925000 { /* BLSP-1 QUP-3 */ nfc-nci@e { compatible = "qcom,nfc-nci"; reg = <0x0e>; qcom,irq-gpio = <&msmgpio 21 0x00>; qcom,dis-gpio = <&msmgpio 20 0x00>; qcom,clk-src = "BBCLK2"; qcom,clk-en-gpio = <&msmgpio 0 0x00>; qcom,irq-gpio = <&msmgpio 77 0x00>; qcom,dis-gpio = <&msmgpio 93 0x00>; qcom,clk-en-gpio = <&msmgpio 78 0x00>; qcom,clk-src = "GPCLK"; interrupt-parent = <&msmgpio>; interrupts = <21 0>; qcom,clk-gpio = <&pm8226_gpios 3 0>; interrupts = <77 0>; qcom,clk-gpio = <&msmgpio 75 0x00>; vlogic-supply = <&pm8110_l14>; }; }; drivers/nfc/nfc-nci.c +13 −0 Original line number Diff line number Diff line Loading @@ -923,6 +923,19 @@ static int qca199x_probe(struct i2c_client *client, goto err_misc_register; } regulators.regulator = regulator_get(&client->dev, regulators.name); if (IS_ERR(regulators.regulator)) { r = PTR_ERR(regulators.regulator); pr_err("regulator get of %s failed (%d)\n", regulators.name, r); } else { /* Enable the regulator */ r = regulator_enable(regulators.regulator); if (r) { pr_err("vreg %s enable failed (%d)\n", regulators.name, r); } } logging_level = 0; /* request irq. The irq is set whenever the chip has data available * for reading. It is cleared when all data has been read. Loading drivers/nfc/nfc-nci.h +6 −0 Original line number Diff line number Diff line Loading @@ -223,3 +223,9 @@ struct nfc_i2c_platform_data { unsigned int reg; }; #endif /* enable LDO */ struct vregs_info { const char * const name; struct regulator *regulator; }; struct vregs_info regulators = {"vlogic", NULL}; Loading
Documentation/devicetree/bindings/nfc/nfc-nci.txt +16 −13 Original line number Diff line number Diff line Loading @@ -10,23 +10,26 @@ Required properties: - qcom,irq-gpio: specific gpio for read interrupt. - qcom,clk-src: nfc clock source ("BBCLK2", "RFCLK3", "GPCLK", ...) - qcom,clk-en-gpio: msm gpio clock,used ony if clock source is msm gpio - vlogic-supply: LDO for power supply - interrupt-parent: Should be phandle for the interrupt controller that services interrupts for this device. - interrupts: should contain the NFC interrupt. NFC has one read interrupt. - qcom,clk-gpio: pmic gpio on which bbclk2 signal is coming. Example: LDO example: i2c@f9925000 { /* BLSP1 QUP3 */ nfc-nci@0e { i2c@f9925000 { /* BLSP-1 QUP-3 */ nfc-nci@e { compatible = "qcom,nfc-nci"; reg = <0x0e>; qcom,irq-gpio = <&msmgpio 21 0x00>; qcom,dis-gpio = <&msmgpio 20 0x00>; qcom,clk-src = "BBCLK2"; qcom,clk-en-gpio = <&msmgpio 0 0x00>; qcom,irq-gpio = <&msmgpio 77 0x00>; qcom,dis-gpio = <&msmgpio 93 0x00>; qcom,clk-en-gpio = <&msmgpio 78 0x00>; qcom,clk-src = "GPCLK"; interrupt-parent = <&msmgpio>; interrupts = <21 0>; qcom,clk-gpio = <&pm8226_gpios 3 0>; interrupts = <77 0>; qcom,clk-gpio = <&msmgpio 75 0x00>; vlogic-supply = <&pm8110_l14>; }; };
drivers/nfc/nfc-nci.c +13 −0 Original line number Diff line number Diff line Loading @@ -923,6 +923,19 @@ static int qca199x_probe(struct i2c_client *client, goto err_misc_register; } regulators.regulator = regulator_get(&client->dev, regulators.name); if (IS_ERR(regulators.regulator)) { r = PTR_ERR(regulators.regulator); pr_err("regulator get of %s failed (%d)\n", regulators.name, r); } else { /* Enable the regulator */ r = regulator_enable(regulators.regulator); if (r) { pr_err("vreg %s enable failed (%d)\n", regulators.name, r); } } logging_level = 0; /* request irq. The irq is set whenever the chip has data available * for reading. It is cleared when all data has been read. Loading
drivers/nfc/nfc-nci.h +6 −0 Original line number Diff line number Diff line Loading @@ -223,3 +223,9 @@ struct nfc_i2c_platform_data { unsigned int reg; }; #endif /* enable LDO */ struct vregs_info { const char * const name; struct regulator *regulator; }; struct vregs_info regulators = {"vlogic", NULL};