Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1912823ybl; Thu, 9 Jan 2020 03:51:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyf5vCmKycwKnuVlOfDl30O+c+CgQ4uzFGw/4ndlUeAz/2TMj1uGfJT5iieIpxSnngF2H8k X-Received: by 2002:aca:c3c4:: with SMTP id t187mr2828946oif.89.1578570682650; Thu, 09 Jan 2020 03:51:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578570682; cv=none; d=google.com; s=arc-20160816; b=nE35gjbcvEdNG4emiR4HgIl02vbvn4poQVhzlz+rC00jIGEaZEMdoqkFnJPsAyD/Ky iWfiEy9AbCtJfbYPDCMDLBerTZUjkLcS25SdcuzadMjWVXeg2jlGh4+NKhxQBHyK5dU0 B2jTdTX4wOXUjkhZ+Csy6CbAGB+HWj/9U6I2uipq6MNoP7QatK8W2wVCtV1JxgmNNfX0 +9G2uSEAVVRALskwXrrvD1PHj3/nJaIaLGilxJvnmGQ3Jwo8z+A7z7q3ZU6ma9cW2WqE FBzRDGzwZQunkp0VaF+3Tz2Ny5BdLEopumewAlKwwlvYMDjmliAKlLgO5C4IAFujZFDA hG9g== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SIH3Ne6v4PFkZV6VUGUzjoFVUhaLqB+lgrvUawjrMYc=; b=HtHBvdw62RYaI1wA7wIxODumpnHpNx9vZi+rGJLBbFBsXPJdDco4jvyTeptG+uPEv+ luzI2RIqP/E31ODPxM4HL9p3CKFnvdD2iC0tQJLcFJJFFcoiJ6vicvIH4h61O5qExvNU ODBTZhX0j6vl5hFE+RD3jfmejNlstw5bj1dCSQjUtwHFlWVJARZBrlgy5/yQRc+wAMo1 1Y9GCa/xQw2d0RCvRaTndNJuR/nnBEyIrbVPvzvERNF9KAOVO7Ut3iG5VG48HNkGHxaO +9C+nVXDjJMlZ5fp6aQshGYx202jAcd+bo82v8Bzs70gCvo/kzT/N01SYrWbvXy6CiMC Ii2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=oSAFRUuI; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v202si3178036oie.79.2020.01.09.03.51.10; Thu, 09 Jan 2020 03:51:22 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=oSAFRUuI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730113AbgAIKba (ORCPT + 99 others); Thu, 9 Jan 2020 05:31:30 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:36387 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728614AbgAIKba (ORCPT ); Thu, 9 Jan 2020 05:31:30 -0500 Received: by mail-qk1-f195.google.com with SMTP id a203so5490857qkc.3 for ; Thu, 09 Jan 2020 02:31:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=SIH3Ne6v4PFkZV6VUGUzjoFVUhaLqB+lgrvUawjrMYc=; b=oSAFRUuI/WV+Ymxkmqk+o2KoSZNYBI6zkdW782vrphCc7w6DF+HXx4WL5QcCrgPKWM w8Zd/vouvnJom/empxWRyjT//3ljh5eDMjX4BoLsXZMMApwg2XAB0d21u1NeFWjdnKC3 NqfR7arNPf2N1W64klSU7LmQqd3JBdciWX4Li4fXnwDgI5UiPILsQ6zrMtpaFqbsTqpV tDuMxNUZukDdIqFswXLJMym1lcVhhkamC87dUCGPwRslHSDiMh7/6A81uVST37sgAlJY TrjuFjdzJI+b9MUPZ89sAu5kMrZpG7AqfI57rwrbSc7qKO1FNy436ko+mA33nMcLvne0 G3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SIH3Ne6v4PFkZV6VUGUzjoFVUhaLqB+lgrvUawjrMYc=; b=CPnbs9LbCcuZtjs2f4sZoiwtz7Q+uNFEGRqP5HblUcyL0JiU7YZGs9GbZpUIDcdscT NbaNN4pKeurli1+qcyB/Zmqj1o1Va/Nf4ht4bpx6QxhOt48nD/8rrPYmTCgCETVShQzn TV6jYGUQ6ys2FyZ37wVSzT9Xe+4EXmMw6bNRCV2nTxcXe5Qhwc7vZdWfmD9mhVb/Rlj+ y+e04IJ7kijL28dfr9XVeTG5+Ug4JCHn4BBuGgKg8fdSB5viq2bCJ8/Mdk6fnpXqMlm4 M0fMPm981NbEblrm0r2weRqi7PE01z1h03GJLAbXwhXddl9r1l2Q3w+SrqP79coh8NNA cYYg== X-Gm-Message-State: APjAAAUlvZFpdoLHEFl+SBVriKoa6hXwHJeRtP78i0zDsfJyVmyHhpq4 9EbtvlwYP0E9zbtKdXqr0xXEdE4ToRNtx/+UgU2JsA== X-Received: by 2002:a37:6255:: with SMTP id w82mr8824719qkb.330.1578565889528; Thu, 09 Jan 2020 02:31:29 -0800 (PST) MIME-Version: 1.0 References: <20200107092922.18408-1-ktouil@baylibre.com> In-Reply-To: <20200107092922.18408-1-ktouil@baylibre.com> From: Bartosz Golaszewski Date: Thu, 9 Jan 2020 11:31:18 +0100 Message-ID: Subject: Re: [PATCH v4 0/5] at24: move write-protect pin handling to nvmem core To: Khouloud Touil Cc: Rob Herring , Mark Rutland , Srinivas Kandagatla , baylibre-upstreaming@groups.io, LKML , linux-devicetree , linux-i2c , Linus Walleij Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 7 sty 2020 o 10:29 Khouloud Touil napisa=C5=82(a= ): > > 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 make the > wp-gpio a reference to the property defined by nvmem , while the > second removes the relevant code in the at24 driver. > > - adds reference in the at25 binding document for the wp-gpios property > as it uses nvmem subsystem. > > Changes since v1: > -Add an explenation on how the wp-gpios works > -Keep reference to the wp-gpios in the at24 binding > > Changes since v2: > -Use the flag GPIO_ACTIVE_HIGH instead of 0 > > Changes since v3: > -Keep the example of the wp-gpios in the at25 bindings > -Add reference for the wp-gpios property in the at25 binding I picked up patches 1-3 & 5 into the at24 tree. Patch 4 will need an Ack from Greg. Bart