Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp618672lqb; Wed, 29 May 2024 06:07:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJWFkM7sDN7s8tK4j5zWW85GQbpZe6A8E+uM6gGPZINyXKJ4b8RvKUxLKHA1FWlTPmSIS+1I6EpJJeq2EJJ4XMz0m4+3IgkTHRX71GQw== X-Google-Smtp-Source: AGHT+IHFVRUB7Irexw0EJAMkTQu5JL5UPqkyLk0wKH6iRjl2B6YmqI6OMJ572CqWwmEJW3373PYZ X-Received: by 2002:a17:906:138e:b0:a63:3b14:184c with SMTP id a640c23a62f3a-a633b141fedmr288574366b.18.1716988028547; Wed, 29 May 2024 06:07:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716988028; cv=pass; d=google.com; s=arc-20160816; b=Afrc59TaLSZ++cB8XF4ChE2y3x6BNEnHKZ1ZNGmGePbD7whDq7cKOAmtuJVFnXcRHQ 1vsjQks2NvVx8039YUkTnW2TwgzrgIka43B8eeIH2bsK63eKMW6JPo/vO3WF9/HKCK2F UP4BWSmTsj04vE+vSuZj4Y919FFCeWCB6AsODqwb/IBblHAetto4dO65n5gabmv5Q/a9 c9FP8AK5ssG4m5tJYZzvPi3R3ZtN4g6ugTjdvE5kwh0QsWcuPs5bjo9TNDZ2/+YKDdpX thbVoTxqy1iczBTZSirVS887JdMpCg7t0cCrvG5XPDrZ/1fXFU/wLg/aU9tSDCVVDUKH SsgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=dUO4qSe59IP/5WJNcjdgYKjFtBWUFE6yBDr3nLbX6CM=; fh=fRzwSirBt7Ih4rIkzRF7E5lrixmur2jPPD8PdnD/3LA=; b=HAGtpg9DrdVibbemBT8HxSwmqoXv/Mwf6XN80yNCIsrTZje27FMG6rcScTjF601l76 U6q5May41zjAR7VCSX1AgEp3SA50tsXKAhflEZ2t/prw0ILZPoB905VaKZa07FmFqHJF ZW+IBW2bb2aM2trTVQ0j8dQLk1Ltt/WCHyy48feai1XdmQfj3UcOW/VOXLapopaI+IbO xfS2B68hh0Ymasqp0w9tL/Nmmz1l81Oe8sOECPCcXnH5prPku+MsZ4J7Obi0V2RneEob 2JBd5ZODBcaAG82lb6nJqhESTHszEFpAYwyB5WyX0tGubAIRaXydGdXS6TQRoriwgXe2 cJJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=awinic.com); spf=pass (google.com: domain of linux-kernel+bounces-194128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194128-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cc63411si623661066b.491.2024.05.29.06.07.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 06:07:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=awinic.com); spf=pass (google.com: domain of linux-kernel+bounces-194128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194128-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2148D1F25EEA for ; Wed, 29 May 2024 13:07:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CCD611CBD; Wed, 29 May 2024 13:06:51 +0000 (UTC) Received: from out198-11.us.a.mail.aliyun.com (out198-11.us.a.mail.aliyun.com [47.90.198.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71BC9DDAB; Wed, 29 May 2024 13:06:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=47.90.198.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716988010; cv=none; b=C+s8QAig3jT5HRbXKho2/KBz2F6I4Xm123p5Gsf/tebzWcflwCNVzVPP+1DycP+Xh3ZxDp5IXtB2F+Osb8bShOsq1SSJO+8IN79wKnA9L2t6eyfgwQ9tiDYH2V1DPkDrA0TqYxBXF7S5rkZvn4TdilAHy9ev6gTPhh23t7fEHt8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716988010; c=relaxed/simple; bh=UNYgwRsC/DcJD432DmuGTrbp3zABC/67odF/gbKNxzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cWeI1qHT7xofOqRcEZZOTWuZhEkhLTRNw56CqXK9Y+8BbVgfADxjR1vTgUbuRePwjzmW6Vv3IBQWpa2eCw4V2ItXA8CEkHm8LoYdh6jCI1GyLydZL8Q7GvobQS3xiRqS+GKpCZVnPUcsC+1ydcNaDfOZGMPzAEACyvHJh0E2b8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=awinic.com; spf=pass smtp.mailfrom=awinic.com; arc=none smtp.client-ip=47.90.198.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=awinic.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=awinic.com X-Alimail-AntiSpam:AC=CONTINUE;BC=0.07436429|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.435426-0.000639855-0.563934;FP=0|0|0|0|0|-1|-1|-1;HT=maildocker-contentspam033045002061;MF=wangshuaijie@awinic.com;NM=1;PH=DS;RN=11;RT=11;SR=0;TI=SMTPD_---.XqPpuA1_1716987984; Received: from awinic..(mailfrom:wangshuaijie@awinic.com fp:SMTPD_---.XqPpuA1_1716987984) by smtp.aliyun-inc.com; Wed, 29 May 2024 21:06:31 +0800 From: wangshuaijie@awinic.com To: dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, jeff@labundy.com, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: wangshuaijie@awinic.com, liweilei@awinic.com, kangjiajun@awinic.com Subject: [PATCH V1 1/5] dt-bindings: input: Add YAML to Awinic sar sensor. Date: Wed, 29 May 2024 13:06:04 +0000 Message-ID: <20240529130608.783624-2-wangshuaijie@awinic.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240529130608.783624-1-wangshuaijie@awinic.com> References: <20240529130608.783624-1-wangshuaijie@awinic.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: shuaijie wang Add the awinic,aw_sar.yaml file to adapt to the awinic sar sensor driver. Signed-off-by: shuaijie wang --- .../bindings/input/awinic,aw_sar.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/awinic,aw_sar.yaml diff --git a/Documentation/devicetree/bindings/input/awinic,aw_sar.yaml b/Documentation/devicetree/bindings/input/awinic,aw_sar.yaml new file mode 100644 index 000000000000..ed4ec29c9b4d --- /dev/null +++ b/Documentation/devicetree/bindings/input/awinic,aw_sar.yaml @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/awinic,aw_sar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Awinic sar sensor driver family + +maintainers: + - Shuaijie Wang + +properties: + compatible: + enum: + - awinic,aw_aw96103 + - awinic,aw_aw96105 + - awinic,aw_aw96303 + - awinic,aw_aw96305 + - awinic,aw_aw96308 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + sar-num: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + set the index of the sar sensor. + + vcc0-supply: + description: + Optional regulator for chip, 1.7V-3.6V. + + channel_use_flag: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The flag of channels used. + Configure according to the specific chip channel used. + Bit[31:0] Each bit represents a channel. + If the customer uses ch0 and ch2, then channel_use_flag=<0x05> + + aw_sar,update_fw: + type: boolean + description: + Choose if you want to update the firmware. + + aw_sar,monitor_esd: + type: boolean + description: + Choose if you want to monitor ESD. + + aw_sar,pin_set_inter_pull-up: + type: boolean + description: + Choose if you want to set the interrupt pin to internal pull-up. + + aw_sar,using_pm_ops: + type: boolean + description: + Choose if you want to use suspend and resume related function. + + aw_sar,use_plug_cail: + type: boolean + description: + Choose If you want to perform calibration when plugging and unplugging the charger. + + start-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + When connecting to aw963xx, select the location where the firmware starts. + set 0 if start in rom. + set 1 if start in ram + + irq-mux: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + set csx as irq pin. config this field when connect to aw96308/aw96305BFOR + +required: + - compatible + - reg + - sar-num + - interrupts + - channel_use_flag + +unevaluatedProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + awinic_sar@12 { + compatible = "awinic,aw_sar"; + reg = <0x12>; + sar-num = < 0 >; + interrupt-parent = < &tlmm >; + interrupts = <72 0>; + //vcc0-supply = <&pm660l_l4>; + channel_use_flag = <0xff>; + aw_sar,update_fw; + //aw_sar,monitor_esd; + start-mode = < 1 >; + irq-mux = < 2 >; + }; + }; -- 2.45.1