From patchwork Sun Aug 28 15:49:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Farber, Eliav" X-Patchwork-Id: 600798 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0382EECAAD2 for ; Sun, 28 Aug 2022 15:49:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229973AbiH1PtL (ORCPT ); Sun, 28 Aug 2022 11:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbiH1PtL (ORCPT ); Sun, 28 Aug 2022 11:49:11 -0400 Received: from smtp-fw-80007.amazon.com (smtp-fw-80007.amazon.com [99.78.197.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CBE832EDC; Sun, 28 Aug 2022 08:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1661701751; x=1693237751; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zU4xJPlhx9313yKXJ3gXwqC/qnSgv3tm1Z0eW7nbiHA=; b=jw5SzcPKKHZFFuQWemfNmEb2ugYUBD5m0JEUr9EFz6LpC+4Kaa8VmTMy gn0PhbjIA17kozQpg+cclfNENjKJhsl1Y/Cn5Xk6l/hdsrFgpD8G9RZfa TlC8QgVQC1V3XdtzhhZAR8sO7Wvp2PZmtm/HpvLGGiIIrrEqbo6gRyPFE I=; X-IronPort-AV: E=Sophos;i="5.93,270,1654560000"; d="scan'208";a="124170975" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-iad-1e-26daedd8.us-east-1.amazon.com) ([10.25.36.214]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2022 15:49:10 +0000 Received: from EX13MTAUWA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1e-26daedd8.us-east-1.amazon.com (Postfix) with ESMTPS id DC311E110B; Sun, 28 Aug 2022 15:49:06 +0000 (UTC) Received: from EX19D013UWA001.ant.amazon.com (10.13.138.253) by EX13MTAUWA001.ant.amazon.com (10.43.160.58) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Sun, 28 Aug 2022 15:49:05 +0000 Received: from EX13MTAUWA001.ant.amazon.com (10.43.160.58) by EX19D013UWA001.ant.amazon.com (10.13.138.253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1118.12; Sun, 28 Aug 2022 15:49:05 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.160.118) with Microsoft SMTP Server id 15.0.1497.38 via Frontend Transport; Sun, 28 Aug 2022 15:49:05 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id DAA244B91; Sun, 28 Aug 2022 15:49:04 +0000 (UTC) From: Eliav Farber To: , , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH v3 1/2] dt-bindings: at24: add new optional power-supply property Date: Sun, 28 Aug 2022 15:49:03 +0000 Message-ID: <20220828154904.20477-2-farbere@amazon.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220828154904.20477-1-farbere@amazon.com> References: <20220828154904.20477-1-farbere@amazon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Boards using the AT24 EEPROMs might have a GPIO that controls the power supply of the chip, and it must be set to enable the usage of it. Add a new optional property to the device tree binding document, which allows to specify a GPIO regulator for the pin that controls the power. On Linux this means that we need to enable the GPIO at the beginning of probe function, before trying to access the chip. Signed-off-by: Eliav Farber --- V2 -> V3: Apply on top of v6.0-rc1 Documentation/devicetree/bindings/eeprom/at24.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml index d14e0accbda8..82f0046f67a9 100644 --- a/Documentation/devicetree/bindings/eeprom/at24.yaml +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml @@ -179,6 +179,10 @@ properties: description: phandle of the regulator that provides the supply voltage. + power-supply: + description: + phandle of the gpio regulator that provides the supply voltage. + required: - compatible - reg