Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1778375ybl; Thu, 19 Dec 2019 02:53:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxvl6cNmNF17lSMic93VPYWVOC2h64KqNannJIVEWGVVBZfK6RFNeK2GeyGK/BpkBHaip8V X-Received: by 2002:a05:6830:13da:: with SMTP id e26mr8231883otq.302.1576752825299; Thu, 19 Dec 2019 02:53:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576752825; cv=none; d=google.com; s=arc-20160816; b=vN7TKa+UBI+fNhEDaSAoL8yPEsRtiVhcQnlTif18e7nNfk6TZuVWYrTzPsODHyn0Tz +RmHMMZg/A3Hb+iAqYhTa/GFSpxCmoaHdWgWnUEmRpsEQNo35YXQfd2wICZxdkkGwO+a zSnMWgXFS9qUao7Urat7StMSJgNPO24dfei+GPnZmzzemvt85jeHB05Uk9u9fRsZVPHg Ikvdl0Mod5DMsJfJjhdtKE68UdxOWLtwPj24+gCiABXH9hAmLyYSsfQFtSzwYgtJfNaM zHF65ltbBXXxn/WSJzNAyaKrIFs99z/tuF0DNAkZwU+sXiiXL880Uo9hUO/1R39hq6ip gpGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=AHcgDnG+4B/fOMPXVM0OtdDtgVdqPAu1gFVGhHkedBU=; b=OUVGsRqHxKPdZvpAc6Etm8Szjlj+pIFfuvsHmruAwoGIwXXxLyIGzXs1XKjgh9tkI/ BDtW530ZyrlHqsc89MI+woKRld3gAbyQWLh9tnRL+3pdv6U5mdSa4CGZ51eWeImi0xVG sQCeFIHfAFQGUAvmuCoVw45LLP+lRe/lGC8I7B7JHaiTFf5kq2KLLS0rdmdlsz220INP 8ix1r7vD8D2um9fNBhCqES4FSOXrwiZgpaVxfs9k1hWW0stvl1EpxMi3vi+4zApYEbFH fcdgbrNlFj4Cr3T0kv5XMqZD88zsQKYCNPTi5MZ2rFQ2MRONhRyh+1gHJ3UWoU4MGRzs 6Kzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PIJVkAgY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p25si3062765oto.191.2019.12.19.02.53.33; Thu, 19 Dec 2019 02:53:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PIJVkAgY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726877AbfLSKvr (ORCPT + 99 others); Thu, 19 Dec 2019 05:51:47 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:54964 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726836AbfLSKvp (ORCPT ); Thu, 19 Dec 2019 05:51:45 -0500 Received: by mail-wm1-f66.google.com with SMTP id b19so4938266wmj.4 for ; Thu, 19 Dec 2019 02:51:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AHcgDnG+4B/fOMPXVM0OtdDtgVdqPAu1gFVGhHkedBU=; b=PIJVkAgYzurVsLG3CEij7N7uAfX13xHLy2HMwTEJiCPq8Yy5pa+gzMqZIZ+TWTWkID yHDOqbLx/tDPUD4vpQaLUfEJVvPLuVurrHvNpZp0ilbSb002pfJimB5X2sj2Qm22iNHo w4ZC5MI9/fmDuogZxRIX+m0lWFzByaDrTiOrRMl153CSR8cH5KyT/IMo8MOUhPygw8Xv pTdFAVokgRAnby2N1PKD2KnzJIK/nJnuor1TRj4crxBsab+GSlALSxduWjB5JljQc2sF T77SzliNPAnS+gW1VxJWSUIyQivodEQo0K9Z/Qlcqvde7wquuoqCdb/yTncJdtbqi8Qi hFiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AHcgDnG+4B/fOMPXVM0OtdDtgVdqPAu1gFVGhHkedBU=; b=NCzh+qd222K/7ujmG4yOpVIZMKlyIsAq93gxLJ924r7dupOlFEn+GutQWlGsY4vKN/ Euj6iKhCKllPTwQML6DBEJL3BFjPrty3iBy4rL0VT7i9TOenUEUJGYzVLL8uy5wL7uAN HA9VaurksjJT6mF1Bvm2Sdv6ybaYXVt2b5ET91RMEgV/dXPJLgAHbcndrC9HbB/YXeo3 vto8/rUUU4bf4u7qrh4OLBBu4DSyHrszhDiWUv249kKczOeguFx1h5Ssw6/nBeeTW7Gp cmnBt+r5d+Ui9My+nCL4qaLnxCFPzqBb9bG1AzTtNQx/WTTWiyybtjBeYGZ9NT24/cAl /PNQ== X-Gm-Message-State: APjAAAU9GKFyDWutxHx5qWTWQGjEc3PogknQv5LulP54nQKiomZ0gq9I OWeRvgBCUmt2q8YTD7TOdXr9fw== X-Received: by 2002:a7b:c318:: with SMTP id k24mr9596970wmj.54.1576752703724; Thu, 19 Dec 2019 02:51:43 -0800 (PST) Received: from [192.168.86.34] (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.googlemail.com with ESMTPSA id y20sm5528069wmi.25.2019.12.19.02.51.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Dec 2019 02:51:43 -0800 (PST) Subject: Re: [PATCH v2 0/4] at24: move write-protect pin handling to nvmem core To: Khouloud Touil , bgolaszewski@baylibre.com, robh+dt@kernel.org, mark.rutland@arm.com, baylibre-upstreaming@groups.io Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-i2c@vger.kernel.org, linus.walleij@linaro.org References: <20191210154157.21930-1-ktouil@baylibre.com> From: Srinivas Kandagatla Message-ID: Date: Thu, 19 Dec 2019 10:51:42 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191210154157.21930-1-ktouil@baylibre.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/2019 15:41, Khouloud Touil wrote: > The write-protect pin handling looks like a standard property that > could benefit other users if available in the core nvmem framework. > > Instead of modifying all the drivers to check this pin, make the > nvmem subsystem check if the write-protect GPIO being passed > through the nvmem_config or defined in the device tree and pull it > low whenever writing to the memory. > > This patchset: > > - adds support for the write-protect pin split into two parts. > The first patch modifies modifies the relevant binding document, > while the second modifies the nvmem code to pull the write-protect > GPIO low (if present) during write operations. > > - removes support for the write-protect pin split into two parts. > The first patch modifies the relevant binding document to remove > the wp-gpio, while the second removes the relevant code in the > at24 driver. > > Changes since v1: > -Add an explenation on how the wp-gpios works > -keep reference to the wp-gpios in the at24 binding > > Khouloud Touil (4): > dt-bindings: nvmem: new optional property write-protect-gpios > nvmem: add support for the write-protect pin > dt-bindings: at24: remove the optional property write-protect-gpios > eeprom: at24: remove the write-protect pin support > Thanks Khouloud for this patchset, I can take this via nvmem tree once we get an ack on dt bindings from DT maintainers. --srini > .../devicetree/bindings/eeprom/at24.yaml | 6 +----- > .../devicetree/bindings/nvmem/nvmem.yaml | 9 +++++++++ > drivers/misc/eeprom/at24.c | 9 --------- > drivers/nvmem/core.c | 19 +++++++++++++++++-- > drivers/nvmem/nvmem.h | 2 ++ > include/linux/nvmem-provider.h | 3 +++ > 6 files changed, 32 insertions(+), 16 deletions(-) >