From patchwork Sun Apr 25 16:31:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 427282 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3018002jao; Sun, 25 Apr 2021 09:33:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMSmnkYq+jRkbAGFFmlyDaymVO91EdxgPO9yaMYOtSqpiZhzZml4ucJBFJ4/QnE7LaqJrc X-Received: by 2002:a05:6402:11cb:: with SMTP id j11mr6096008edw.282.1619368414569; Sun, 25 Apr 2021 09:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619368414; cv=none; d=google.com; s=arc-20160816; b=a5nO07KY8A01exGaxhcB/f5k99UmIp0co7qSCtqZv3aYiJPblW6eQiHRPHhv4TkGPD 2IcVuMcyFK9FZF04ca7PbAqFKb2vDuPDTJ7WKzIXj6pOTrme9FRihW1stvhZyNZh+tAs ESrCF5xZk4vKRAsV/gOt1sYA5sYPCho2sAxrdiCO74qMCk9QcfK9DKwFGL+PcoVSBxaX okrp/FV4ixTqUgeuPQWLIbwzVvZrHN1TK/82QxrVWLM4VJTedBm84btUchS4LqCrnCSr jgMPNqkYwlLQFm1mHq/kW7jUS7MgbzDRNHWEsp3YHn9VNZS22hqIbWT2HD3B/U5KrlBK eSRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7SPQQqmnNxgUJWeM/yScDWMCEjD5OGTfPsMxNvsQziw=; b=Aam7/hkqGLZf7E9esCNL/C/ouKLUYWwWEAvL6hEGaRZbg9U95Bkjyp1L+ZItfb7nAR KVS0WkATEn/87reyRw3o5XxfiOlPOr9wxkD47Qb2dHWNsNsJJtWThC/7JcvjyNXPkNzv siNyWnsE0yoxeoLMsuYbphHhO5NeZlebshtZ3mpYSGAQuuelXJuVrGpvXzdgSeLAb3mf 5K2FqR8Ry8Rjtys3jLEJkl/NtZrAGAG6GhEvAsDNwI6F+SCJKKekhPyR7rxy2vRHdQ2K bUMpmnZYASbqHpAmtOaN0hCN1m+n9PA78oLQznmjsnWDpJrIBEaLj56byH33PjCSU2j4 mFmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GuaiZ9sn; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id en21si10756468ejc.53.2021.04.25.09.33.34; Sun, 25 Apr 2021 09:33:34 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GuaiZ9sn; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230363AbhDYQeM (ORCPT + 6 others); Sun, 25 Apr 2021 12:34:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:41480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230359AbhDYQeL (ORCPT ); Sun, 25 Apr 2021 12:34:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D94D61220; Sun, 25 Apr 2021 16:33:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619368412; bh=7ulvZw7FoVtlF5MLF312vy35wymDDd1C1msBUl5+1Uc=; h=From:To:Cc:Subject:Date:From; b=GuaiZ9snyLX/RNB0bQKi7Ts27HyqbFVe+n/k5lCMqp+soZc1j0ytxk7TXWzDEjUOY eqyaOrfCwr+XVelfSOzZWqHa3A52Rq0udvCBc4+VlsrQgbS5YZJbItFUxhoHse0j4+ wtnu3jtas/zg1Y8QhvytwT5KXMcQIfhVy42CyiEYEXDqAAFpTSF0WZTGgxokak18rB +sS437fvQFfgokfJczrToYZEoAxZaAryc87MAHE2hJ7sDq9wg55vSgdTAIadod1Dud 0+4DXWuWMdRPKj8m/bhlVktvWSkfBM7Hr1FecGsf95EIw6k4GBXGVzfjbvfLn7dmg7 bLcAcRWHz3DyQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring Cc: Lars-Peter Clausen , devicetree@vger.kernel.org, Jonathan Cameron Subject: [PATCH v4 0/2] iio:adc:ad7476: Regulator support and binding doc Date: Sun, 25 Apr 2021 17:31:52 +0100 Message-Id: <20210425163154.73209-1-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This driver supports a whole load of devices with a range of different power supply connections. Lars-Peter Clausen pointed out v1 did not handle the the ad7091r which an internal voltage reference, but that can be over-driven on the vref_in / vref_out pin. The v2 handles that device properly. I also realized that I'd the binding was more restrictive for devices with internal references than it needed to be (required vcc-supply) so I've relaxed that in the updated bindings. Also reorganized the big allOf block in the binding doc to put all the constraints on reference voltage first. v3 incorporates Lars' suggestion to set the regulator pointer to null as a way to indicate that we should definitely use the internal reference. v4 fixes case of errors on the devm_regulator_get_optional() that are about something different than -ENODEV which signifies the regulator isn't specified. Jonathan Cameron (2): iio:adc:ad7476: Handle the different regulators used by various parts. dt-bindings:iio:adc:adi,ad7476: Add missing binding document .../bindings/iio/adc/adi,ad7476.yaml | 174 ++++++++++++++++++ drivers/iio/adc/ad7476.c | 118 ++++++++++-- 2 files changed, 277 insertions(+), 15 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml -- 2.31.1