Loading arch/arm64/boot/dts/qcom/sdm845-cdp.dtsi +1 −4 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -320,7 +320,6 @@ qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; qcom,nq-esepwr = <&tlmm 116 0x00>; interrupt-parent = <&tlmm>; qcom,clk-src = "BBCLK3"; interrupts = <63 0>; interrupt-names = "nfc_irq"; pinctrl-names = "nfc_active", "nfc_suspend"; Loading @@ -328,8 +327,6 @@ &nfc_enable_active &nfc_clk_default>; pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; clocks = <&clock_rpmh RPMH_LN_BB_CLK3>; clock-names = "ref_clk"; }; }; Loading arch/arm64/boot/dts/qcom/sdm845-mtp.dtsi +1 −4 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -319,7 +319,6 @@ qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; qcom,nq-esepwr = <&tlmm 116 0x00>; interrupt-parent = <&tlmm>; qcom,clk-src = "BBCLK3"; interrupts = <63 0>; interrupt-names = "nfc_irq"; pinctrl-names = "nfc_active", "nfc_suspend"; Loading @@ -327,8 +326,6 @@ &nfc_enable_active &nfc_clk_default>; pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; clocks = <&clock_rpmh RPMH_LN_BB_CLK3>; clock-names = "ref_clk"; }; }; Loading arch/arm64/boot/dts/qcom/sdm845-qrd.dtsi +1 −4 Original line number Diff line number Diff line /* Copyright (c) 2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -82,7 +82,6 @@ qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; qcom,nq-esepwr = <&tlmm 116 0x00>; interrupt-parent = <&tlmm>; qcom,clk-src = "BBCLK3"; interrupts = <63 0>; interrupt-names = "nfc_irq"; pinctrl-names = "nfc_active", "nfc_suspend"; Loading @@ -90,8 +89,6 @@ &nfc_enable_active &nfc_clk_default>; pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; clocks = <&clock_rpmh RPMH_LN_BB_CLK3>; clock-names = "ref_clk"; }; }; Loading drivers/nfc/nq-nci.c +16 −9 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ struct nqx_platform_data { unsigned int firm_gpio; unsigned int ese_gpio; const char *clk_src_name; /* NFC_CLK pin voting state */ bool clk_pin_voting; }; static const struct of_device_id msm_match_table[] = { Loading Loading @@ -487,9 +489,11 @@ int nfc_ioctl_power_states(struct file *filp, unsigned long arg) gpio_set_value(nqx_dev->en_gpio, 0); usleep_range(10000, 10100); } if (nqx_dev->pdata->clk_pin_voting) { r = nqx_clock_deselect(nqx_dev); if (r < 0) dev_err(&nqx_dev->client->dev, "unable to disable clock\n"); } nqx_dev->nfc_ven_enabled = false; } else if (arg == 1) { nqx_enable_irq(nqx_dev); Loading @@ -502,9 +506,11 @@ int nfc_ioctl_power_states(struct file *filp, unsigned long arg) } gpio_set_value(nqx_dev->en_gpio, 1); usleep_range(10000, 10100); if (nqx_dev->pdata->clk_pin_voting) { r = nqx_clock_select(nqx_dev); if (r < 0) dev_err(&nqx_dev->client->dev, "unable to enable clock\n"); } nqx_dev->nfc_ven_enabled = true; } else if (arg == 2) { /* Loading Loading @@ -841,12 +847,13 @@ static int nfc_parse_dt(struct device *dev, struct nqx_platform_data *pdata) pdata->ese_gpio = -EINVAL; } r = of_property_read_string(np, "qcom,clk-src", &pdata->clk_src_name); if (of_property_read_string(np, "qcom,clk-src", &pdata->clk_src_name)) pdata->clk_pin_voting = false; else pdata->clk_pin_voting = true; pdata->clkreq_gpio = of_get_named_gpio(np, "qcom,nq-clkreq", 0); if (r) return -EINVAL; return r; } Loading Loading
arch/arm64/boot/dts/qcom/sdm845-cdp.dtsi +1 −4 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -320,7 +320,6 @@ qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; qcom,nq-esepwr = <&tlmm 116 0x00>; interrupt-parent = <&tlmm>; qcom,clk-src = "BBCLK3"; interrupts = <63 0>; interrupt-names = "nfc_irq"; pinctrl-names = "nfc_active", "nfc_suspend"; Loading @@ -328,8 +327,6 @@ &nfc_enable_active &nfc_clk_default>; pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; clocks = <&clock_rpmh RPMH_LN_BB_CLK3>; clock-names = "ref_clk"; }; }; Loading
arch/arm64/boot/dts/qcom/sdm845-mtp.dtsi +1 −4 Original line number Diff line number Diff line /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -319,7 +319,6 @@ qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; qcom,nq-esepwr = <&tlmm 116 0x00>; interrupt-parent = <&tlmm>; qcom,clk-src = "BBCLK3"; interrupts = <63 0>; interrupt-names = "nfc_irq"; pinctrl-names = "nfc_active", "nfc_suspend"; Loading @@ -327,8 +326,6 @@ &nfc_enable_active &nfc_clk_default>; pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; clocks = <&clock_rpmh RPMH_LN_BB_CLK3>; clock-names = "ref_clk"; }; }; Loading
arch/arm64/boot/dts/qcom/sdm845-qrd.dtsi +1 −4 Original line number Diff line number Diff line /* Copyright (c) 2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -82,7 +82,6 @@ qcom,nq-clkreq = <&pm8998_gpios 21 0x00>; qcom,nq-esepwr = <&tlmm 116 0x00>; interrupt-parent = <&tlmm>; qcom,clk-src = "BBCLK3"; interrupts = <63 0>; interrupt-names = "nfc_irq"; pinctrl-names = "nfc_active", "nfc_suspend"; Loading @@ -90,8 +89,6 @@ &nfc_enable_active &nfc_clk_default>; pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; clocks = <&clock_rpmh RPMH_LN_BB_CLK3>; clock-names = "ref_clk"; }; }; Loading
drivers/nfc/nq-nci.c +16 −9 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ struct nqx_platform_data { unsigned int firm_gpio; unsigned int ese_gpio; const char *clk_src_name; /* NFC_CLK pin voting state */ bool clk_pin_voting; }; static const struct of_device_id msm_match_table[] = { Loading Loading @@ -487,9 +489,11 @@ int nfc_ioctl_power_states(struct file *filp, unsigned long arg) gpio_set_value(nqx_dev->en_gpio, 0); usleep_range(10000, 10100); } if (nqx_dev->pdata->clk_pin_voting) { r = nqx_clock_deselect(nqx_dev); if (r < 0) dev_err(&nqx_dev->client->dev, "unable to disable clock\n"); } nqx_dev->nfc_ven_enabled = false; } else if (arg == 1) { nqx_enable_irq(nqx_dev); Loading @@ -502,9 +506,11 @@ int nfc_ioctl_power_states(struct file *filp, unsigned long arg) } gpio_set_value(nqx_dev->en_gpio, 1); usleep_range(10000, 10100); if (nqx_dev->pdata->clk_pin_voting) { r = nqx_clock_select(nqx_dev); if (r < 0) dev_err(&nqx_dev->client->dev, "unable to enable clock\n"); } nqx_dev->nfc_ven_enabled = true; } else if (arg == 2) { /* Loading Loading @@ -841,12 +847,13 @@ static int nfc_parse_dt(struct device *dev, struct nqx_platform_data *pdata) pdata->ese_gpio = -EINVAL; } r = of_property_read_string(np, "qcom,clk-src", &pdata->clk_src_name); if (of_property_read_string(np, "qcom,clk-src", &pdata->clk_src_name)) pdata->clk_pin_voting = false; else pdata->clk_pin_voting = true; pdata->clkreq_gpio = of_get_named_gpio(np, "qcom,nq-clkreq", 0); if (r) return -EINVAL; return r; } Loading