mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>,
	robh+dt@kernel.org, lee.jones@linaro.org,
	linus.walleij@linaro.org, broonie@kernel.org
Cc: myungjoo.ham@samsung.com, lgirdwood@gmail.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: Re: [PATCH v2 2/7] extcon: arizona: Move binding over to dtschema
Date: Thu, 7 May 2020 12:43:18 +0900	[thread overview]
Message-ID: <4ee56044-22f2-04f8-445b-b431b7053bc7@samsung.com> (raw)
In-Reply-To: <20200506155758.14643-2-ckeepax@opensource.cirrus.com>

Hi Charles,

On 5/7/20 12:57 AM, Charles Keepax wrote:
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
> ---
> 
> Changes since v1:
>  - Removed some description that duplicates constraints
> 
> Thanks,
> Charles
> 
>  .../devicetree/bindings/extcon/extcon-arizona.txt  |  76 -------------
>  .../devicetree/bindings/extcon/wlf,arizona.yaml    | 125 +++++++++++++++++++++
>  2 files changed, 125 insertions(+), 76 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/extcon/extcon-arizona.txt
>  create mode 100644 Documentation/devicetree/bindings/extcon/wlf,arizona.yaml
> 
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> deleted file mode 100644
> index 208daaff0be4f..0000000000000
> --- a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> +++ /dev/null
> @@ -1,76 +0,0 @@
> -Cirrus Logic Arizona class audio SoCs
> -
> -These devices are audio SoCs with extensive digital capabilities and a range
> -of analogue I/O.
> -
> -This document lists Extcon specific bindings, see the primary binding document:
> -  ../mfd/arizona.txt
> -
> -Optional properties:
> -
> -  - wlf,hpdet-channel : Headphone detection channel.
> -    ARIZONA_ACCDET_MODE_HPL or 1 - Headphone detect mode is set to HPDETL
> -    ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR
> -    If this node is not mentioned or if the value is unknown, then
> -    headphone detection mode is set to HPDETL.
> -
> -  - wlf,use-jd2 : Use the additional JD input along with JD1 for dual pin jack
> -    detection.
> -  - wlf,use-jd2-nopull : Internal pull on JD2 is disabled when used for
> -    jack detection.
> -  - wlf,jd-invert : Invert the polarity of the jack detection switch
> -
> -  - wlf,micd-software-compare : Use a software comparison to determine mic
> -    presence
> -  - wlf,micd-detect-debounce : Additional software microphone detection
> -    debounce specified in milliseconds.
> -  - wlf,micd-pol-gpio : GPIO specifier for the GPIO controlling the headset
> -    polarity if one exists.
> -  - wlf,micd-bias-start-time : Time allowed for MICBIAS to startup prior to
> -    performing microphone detection, specified as per the ARIZONA_MICD_TIME_XXX
> -    defines.
> -  - wlf,micd-rate : Delay between successive microphone detection measurements,
> -    specified as per the ARIZONA_MICD_TIME_XXX defines.
> -  - wlf,micd-dbtime : Microphone detection hardware debounces specified as the
> -    number of measurements to take, valid values being 2 and 4.
> -  - wlf,micd-timeout-ms : Timeout for microphone detection, specified in
> -    milliseconds.
> -  - wlf,micd-force-micbias : Force MICBIAS continuously on during microphone
> -    detection.
> -  - wlf,micd-configs : Headset polarity configurations (generally used for
> -    detection of CTIA / OMTP headsets), the field can be of variable length
> -    but should always be a multiple of 3 cells long, each three cell group
> -    represents one polarity configuration.
> -    The first cell defines the accessory detection pin, zero will use MICDET1
> -    and all other values will use MICDET2.
> -    The second cell represents the MICBIAS to be used.
> -    The third cell represents the value of the micd-pol-gpio pin.
> -
> -  - wlf,gpsw : Settings for the general purpose switch, set as one of the
> -    ARIZONA_GPSW_XXX defines.
> -
> -Example:
> -
> -codec: wm8280@0 {
> -	compatible = "wlf,wm8280";
> -	reg = <0>;
> -	...
> -
> -	wlf,use-jd2;
> -	wlf,use-jd2-nopull;
> -	wlf,jd-invert;
> -
> -	wlf,micd-software-compare;
> -	wlf,micd-detect-debounce = <0>;
> -	wlf,micd-pol-gpio = <&codec 2 0>;
> -	wlf,micd-rate = <ARIZONA_MICD_TIME_8MS>;
> -	wlf,micd-dbtime = <4>;
> -	wlf,micd-timeout-ms = <100>;
> -	wlf,micd-force-micbias;
> -	wlf,micd-configs = <
> -		0 1 0 /* MICDET1 MICBIAS1 GPIO=low */
> -		1 2 1 /* MICDET2 MICBIAS2 GPIO=high */
> -	>;
> -
> -	wlf,gpsw = <ARIZONA_GPSW_OPEN>;
> -};
> diff --git a/Documentation/devicetree/bindings/extcon/wlf,arizona.yaml b/Documentation/devicetree/bindings/extcon/wlf,arizona.yaml
> new file mode 100644
> index 0000000000000..f9845dc2f5ae5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/extcon/wlf,arizona.yaml
> @@ -0,0 +1,125 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: https://protect2.fireeye.com/url?k=696fcddc-34bc96c8-696e4693-0cc47a31ce4e-2a3e86cfac9f17c2&q=1&u=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fextcon%2Fwlf%2Carizona.yaml%23
> +$schema: https://protect2.fireeye.com/url?k=afda1ee7-f20945f3-afdb95a8-0cc47a31ce4e-9f3472c530744134&q=1&u=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23
> +
> +title: Cirrus Logic/Wolfson Microelectronics Arizona class audio SoCs
> +
> +maintainers:
> +  - patches@opensource.cirrus.com
> +
> +description: |
> +  These devices are audio SoCs with extensive digital capabilities and a
> +  range of analogue I/O.
> +
> +  This document lists Extcon specific bindings, see the primary binding
> +  document ../mfd/arizona.yaml
> +
> +properties:
> +  wlf,hpdet-channel:
> +    description:
> +      Headphone detection channel.  ARIZONA_ACCDET_MODE_HPL/1 sets the
> +      headphone detect mode to HPDETL, ARIZONA_ACCDET_MODE_HPR/2 sets it
> +      to HPDETR.  If this node is not included or if the value is unknown,
> +      then headphone detection mode is set to HPDETL.
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    minimum: 1
> +    maximum: 2
> +
> +  wlf,use-jd2:
> +    description:
> +      Use the additional JD input along with JD1 for dual pin jack detection.
> +    type: boolean
> +
> +  wlf,use-jd2-nopull:
> +    description:
> +      Internal pull on JD2 is disabled when used for jack detection.
> +    type: boolean
> +
> +  wlf,jd-invert:
> +    description:
> +      Invert the polarity of the jack detection switch.
> +    type: boolean
> +
> +  wlf,micd-software-compare:
> +    description:
> +      Use a software comparison to determine mic presence.
> +    type: boolean
> +
> +  wlf,micd-detect-debounce:
> +    description:
> +      Additional software microphone detection debounce specified in
> +      milliseconds.
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +
> +  wlf,micd-pol-gpio:
> +    description:
> +      GPIO specifier for the GPIO controlling the headset polarity if one
> +      exists.
> +    maxItems: 1
> +
> +  wlf,micd-bias-start-time:
> +    description:
> +      Time allowed for MICBIAS to startup prior to performing microphone
> +      detection, specified as per the ARIZONA_MICD_TIME_XXX defines.
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    minimum: 0
> +    maximum: 12
> +
> +  wlf,micd-rate:
> +    description:
> +      Delay between successive microphone detection measurements, specified
> +      as per the ARIZONA_MICD_TIME_XXX defines.
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    minimum: 0
> +    maximum: 12
> +
> +  wlf,micd-dbtime:
> +    description:
> +      Microphone detection hardware debounces specified as the number of
> +      measurements to take.
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    enum: [2, 4]
> +
> +  wlf,micd-timeout-ms:
> +    description:
> +      Timeout for microphone detection, specified in milliseconds.
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +
> +  wlf,micd-force-micbias:
> +    description:
> +      Force MICBIAS continuously on during microphone detection.
> +    type: boolean
> +
> +  wlf,micd-configs:
> +    description:
> +      Headset polarity configurations (generally used for detection of
> +      CTIA / OMTP headsets), the field can be of variable length but
> +      should always be a multiple of 3 cells long, each three cell group
> +      represents one polarity configuration.
> +    $ref: "/schemas/types.yaml#/definitions/uint32-matrix"
> +    items:
> +      items:
> +        - description:
> +            The first cell defines the accessory detection pin, zero
> +            will use MICDET1 and 0x2000 will use MICDET2.
> +          enum: [ 0, 0x2000 ]
> +        - description:
> +            The second cell represents the MICBIAS to be used. Zero
> +            will use MICVDD, 1-3 will use MICBIASx.
> +          minimum: 0
> +          maximum: 3
> +        - description:
> +            The third cell represents the value of the micd-pol-gpio
> +            pin.
> +          minimum: 0
> +          maximum: 1
> +
> +  wlf,gpsw:
> +    description:
> +      Settings for the general purpose switch, set as one of the
> +      ARIZONA_GPSW_XXX defines.
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    minimum: 0
> +    maximum: 3
> 

Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

  reply	other threads:[~2020-05-07  3:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 15:57 [PATCH v2 1/7] regulator: arizona-regulator: " Charles Keepax
2020-05-06 15:57 ` [PATCH v2 2/7] extcon: arizona: " Charles Keepax
2020-05-07  3:43   ` Chanwoo Choi [this message]
2020-05-06 15:57 ` [PATCH v2 3/7] ASoC: " Charles Keepax
2020-05-06 15:57 ` [PATCH v2 4/7] mfd: " Charles Keepax
2020-05-06 15:57 ` [PATCH v2 5/7] ASoC: madera: " Charles Keepax
2020-05-06 15:57 ` [PATCH v2 6/7] pinctrl: " Charles Keepax
2020-05-06 15:57 ` [PATCH v2 7/7] mfd: " Charles Keepax
2020-05-12 15:29 ` [PATCH v2 1/7] regulator: arizona-regulator: " Charles Keepax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ee56044-22f2-04f8-445b-b431b7053bc7@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=patches@opensource.cirrus.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®