From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD554C3F68F for ; Wed, 8 Jan 2020 16:46:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 813EE2073A for ; Wed, 8 Jan 2020 16:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578501994; bh=UVugCtsw7CB7ATgQSrinEilnGkhZ2JV07PnqbNG9AjM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=oczhBj4ldOvf5BpxxGUb9U8eLICix2GuHmjyE0qG5zMENYOaxLUANnXVlCCa8ogq3 ic02/dDdTtfjRJ1oYePI4xw995drSb5GU0zCzWFX33eiJ0B3kEwalc4naFRK0KxIWG aSYI6fYBcM5TkBobSG/lXa0kDlkpZCPcBplURTPI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729353AbgAHQqa (ORCPT ); Wed, 8 Jan 2020 11:46:30 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:34158 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727148AbgAHQq3 (ORCPT ); Wed, 8 Jan 2020 11:46:29 -0500 Received: by mail-ot1-f65.google.com with SMTP id a15so4229291otf.1 for ; Wed, 08 Jan 2020 08:46:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=CkWGPmeVEEVzqEBeNOF39Am+w28soAd+AXNynQRs0bw=; b=aqKxc1kjbrObNrP5yzeGg88RswbQxGD7piL76HQtUBArqXOokkBHk0fE5kzbjLlMU2 uURbLkD/2GJUvV3RSP06IpjrDwHhfsxPCUo6bjFxwL2GMvBGSnUbnsqh/3RH6qXVY7// 1VZnd0qh7PNtnOBVBXvFRvMX4iqtc6ysCYN46mbVng6Svd5DiddIKlKDuHifn/XqsaLO NxuZ0+U1CiMTvcZGaKDZYp6GjRLuXvf6/abtleyuZuq5ld7pNXTVw1lXwGQTsAhzKc3U r+oagdHiT/Zoj7+77LRkMuLI1xuoe3fP4wSjI4dXIqXUIqXJLVbXayqWAkVCFaXki+Zn YZ/Q== X-Gm-Message-State: APjAAAVwJtVz4Q80mj1989QXT6SoR/mlOEmvjCy8w+XvGAwp4xrZTEfS A2wGV603yjVcr13aiph2HMFgogQ= X-Google-Smtp-Source: APXvYqy5VxP6jbgzfKFkkotOa2gjkV2zp7pSdRy7DVfFPm4Qj1z1O6yNdeYWL54CneD7h6lA1p5Ktg== X-Received: by 2002:a9d:68d1:: with SMTP id i17mr4674417oto.367.1578501988289; Wed, 08 Jan 2020 08:46:28 -0800 (PST) Received: from rob-hp-laptop (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id p21sm1308232otc.21.2020.01.08.08.46.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 08:46:26 -0800 (PST) Received: from rob (uid 1000) (envelope-from rob@rob-hp-laptop) id 220333 by rob-hp-laptop (DragonFly Mail Agent v0.11); Wed, 08 Jan 2020 10:46:23 -0600 Date: Wed, 8 Jan 2020 10:46:23 -0600 From: Rob Herring To: Linus Walleij Cc: Jonathan Cameron , linux-iio@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-input@vger.kernel.org, Stephan Gerhold , Donggeun Kim , Minkyu Kang , =?utf-8?B?UGF3ZcWC?= Chmiel , Jonathan Bakker , Oskar Andero , Dmitry Torokhov , devicetree@vger.kernel.org Subject: Re: [PATCH 1/2 v1] iio: light: Add DT bindings for GP2AP002 Message-ID: <20200108164623.GA18967@bogus> References: <20191228201109.13635-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191228201109.13635-1-linus.walleij@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Sat, Dec 28, 2019 at 09:11:08PM +0100, Linus Walleij wrote: > This adds device tree bindings for the GP2AP002 light > and proximity sensor. > > As with other early proximity sensors (~2010) the light > sensor and proximity sensors were combined into a single > component. > > Cc: Stephan Gerhold > Cc: Donggeun Kim > Cc: Minkyu Kang > Cc: Paweł Chmiel > Cc: Jonathan Bakker > Cc: Oskar Andero > Cc: Dmitry Torokhov > Cc: devicetree@vger.kernel.org > Signed-off-by: Linus Walleij > --- > .../bindings/iio/light/sharp,gp2ap002.yaml | 87 +++++++++++++++++++ > 1 file changed, 87 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/light/sharp,gp2ap002.yaml > > diff --git a/Documentation/devicetree/bindings/iio/light/sharp,gp2ap002.yaml b/Documentation/devicetree/bindings/iio/light/sharp,gp2ap002.yaml > new file mode 100644 > index 000000000000..27d129e76a8b > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/light/sharp,gp2ap002.yaml > @@ -0,0 +1,87 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/light/sharp,gp2ap002.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Sharp GP2AP002A00F and GP2AP002S00F proximity and ambient light sensors > + > +maintainers: > + - Linus Walleij > + > +description: | > + Proximity and ambient light sensor with IR LED for the proximity > + sensing and an analog output for light intensity. The ambient light > + sensor output is not available on the GP2AP002S00F variant. > + > +properties: > + compatible: > + enum: > + - sharp,gp2ap002a00f > + - sharp,gp2ap002s00f > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + description: an interrupt for proximity, usually a GPIO line > + > + vdd-supply: > + maxItems: 1 *-supply is always 1 item, so drop. > + description: VDD power supply a phandle to a regulator > + > + vio-supply: > + maxItems: 1 > + description: VIO power supply a phandle to a regulator > + > + io-channels: > + maxItems: 1 > + description: ALSOUT ADC channel to read the ambient light > + > + io-channel-names: > + const: "alsout" Drop quotes > + > + sharp,proximity-far-hysteresis: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Hysteresis setting for "far" object detection, this setting is > + device-unique and adjust the optical setting for proximity detection > + of a "far away" object in front of the sensor. 0-2^32 is allowed? default? > + > + sharp,proximity-close-hysteresis: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Hysteresis setting for "close" object detection, this setting is > + device-unique and adjust the optical setting for proximity detection > + of a "close" object in front of the sensor. > + > +required: > + - compatible > + - reg > + - interrupts > + - sharp,proximity-far-hysteresis > + - sharp,proximity-close-hysteresis > + > +examples: > + - | > + #include > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + light-sensor@44 { > + compatible = "sharp,gp2ap002a00f"; > + reg = <0x44>; > + interrupts = <18 IRQ_TYPE_EDGE_FALLING>; > + vdd-supply = <&vdd_regulator>; > + vio-supply = <&vio_regulator>; > + io-channels = <&adc_channel>; > + io-channel-names = "alsout"; > + sharp,proximity-far-hysteresis = <0x2f>; > + sharp,proximity-close-hysteresis = <0x0f>; > + }; > + }; > + > +... > -- > 2.21.0 >