Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp163888pja; Fri, 22 Nov 2019 04:55:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxfe0jonfaqVh/wpatQoZ9qRHaFBm5vYJwwtr+/1nFzhQfVHy7p3Jc3e7p2ZH4gUWhcwGea X-Received: by 2002:a17:906:37cd:: with SMTP id o13mr21625987ejc.148.1574427329170; Fri, 22 Nov 2019 04:55:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574427329; cv=none; d=google.com; s=arc-20160816; b=dn6DPVnMnbmuNkfbE4xUs5nDgTTkNjoywQv6Z5VMabOIU2h4gC0+TFBkeuWCceaVrQ uxWb+hlBZGKLbZ819e7QNnrLbRAPTB31PT9HvVsP8L4XWODRWUtEHbh5lfENpRaWgSja N0MMfL31r5jVb+Yz9kGAQmoNpzKU7T5MbxnDPgPwnHUZixtuWa9QiwzZhzKEJGrj3zEk HwvANsTC+Wq7/WwqdtVAp014GXGTKzVGkjBm6hf7vYujyKwUM+TH8NYRbB/3jKhxARdy iVjJr+SbjuUdBzli761LnmugXh2KIyG4UhRL6jABktM510/avEIPLbpBcGXfuSzE0uvP Wt4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=C8R7NEDueibHtXFqup1VmL6iM+bPcC4QfocIAUJQOdI=; b=aUBilLn2bfmpoNF5wiIONBl9oEW4kle+i734uwv1RZz0o/LRSQGhoVYdG+fLXo11pO YP63f09Kl/LkkSmsUGrbxSGLxmjmMAvwqqL5XA6hzwuFn7mri/dT3+/FR3M7BEUlORbL y/KYme+jdypmMs3yH1l9eJ9vKXbI6Bdv40/UwTP80JZE8q+MujkIr5U7ilOvdlOKuZq4 qXMVIrhFWwZTReqw+ua5ywwztWSgRhU8z956MchLTZTAf+7Mr2DK6v10jsPgFxeWBWnR 9xCnVVrPaQYASHiNvxA7+m38NtOjpjpec2/oNRK2gJ2hDGNkjucW5B5KIeKc+89LvgQ/ BywQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aUmmmSwS; 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 fx21si4108326ejb.254.2019.11.22.04.55.05; Fri, 22 Nov 2019 04:55:29 -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=aUmmmSwS; 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 S1727673AbfKVMxU (ORCPT + 99 others); Fri, 22 Nov 2019 07:53:20 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42091 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbfKVMxU (ORCPT ); Fri, 22 Nov 2019 07:53:20 -0500 Received: by mail-lf1-f68.google.com with SMTP id y19so5419046lfl.9 for ; Fri, 22 Nov 2019 04:53:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C8R7NEDueibHtXFqup1VmL6iM+bPcC4QfocIAUJQOdI=; b=aUmmmSwS2BYNFlhTaRJt05gbgpUdl9bPc4u0dViAnMhe+39FKwYcZ5ZbeMtu0YMR1h IMtow+JySIg9ZfoOQcJsSD/0nbQjROkqD6bY4pZTUS3tDkGvX6a01RAXLscAvxSzD0nA QSwbypkiAWDMoz1jmGm5iQLWssZx0ubVG0s79UqJYD4tV/dLycPSBlAe2pOFK1fOICeb 9M95KnzCyYm10ONh5r8//OSi9ZBVIVnqYEKeCycfswYit/q0p8sEk1NafChgug73axNQ iJJITbdBMZAhgOUSLghwYkJFa37E99WBLRwet4NYoBaWRLBNqWoXFbu2MaVgLIcX2UbL RVhA== 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; bh=C8R7NEDueibHtXFqup1VmL6iM+bPcC4QfocIAUJQOdI=; b=aFgV056njGCkGmtnCheKlD1wh+Tr766znD0sQcwA9UtYKMr2HuK8s4jSSaZazbIfq/ as0rDcfq4lQv/v589s6nr7RoQ0NNywS673xZgbJLYuqQkA9AoLppEDNw6cSAagSnfEyB HgWbTBmk22NaCMOJDFX2qlDBMz4LqPRb+ovyQ3dnHNbyuUUuNLJC9/ADvcxw/Ev+NbE8 78WrwxT8y7ArV3CJuj3vZLXsRn5WXYA+1bUITEeUFHHy12JMbTFSKxTK5daWCpuDmCEC 2Jpq3odyNnHq/zPneEbEg2gfqtkPjMSY/nFia01dzB5mFORyn7dZ4rCcLi94ygY1dBq1 DUTw== X-Gm-Message-State: APjAAAWTazNWr2YLwzUMXj5TFllh7TwbcRBBZB0GzNzCADbMM8kS8gU/ 0v6W9FPQv/DBF0jAJwD6sgQYnf2D2h/B3F8b165jsw== X-Received: by 2002:a19:f701:: with SMTP id z1mr6862942lfe.133.1574427198426; Fri, 22 Nov 2019 04:53:18 -0800 (PST) MIME-Version: 1.0 References: <20191120142038.30746-1-ktouil@baylibre.com> <20191120142038.30746-2-ktouil@baylibre.com> In-Reply-To: From: Linus Walleij Date: Fri, 22 Nov 2019 13:53:07 +0100 Message-ID: Subject: Re: [PATCH 1/4] dt-bindings: nvmem: new optional property write-protect-gpios To: Bartosz Golaszewski Cc: Khouloud Touil , Rob Herring , Mark Rutland , Srinivas Kandagatla , baylibre-upstreaming@groups.io, "linux-kernel@vger.kernel.org" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-i2c Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 22, 2019 at 1:47 PM Bartosz Golaszewski wrote: > what about the existing bindings for at24 that don't mandate the > active-low flag? I'm afraid this would break the support for this > specific chip or lead to code duplication if we had this in both nvmem > and at24 with different logic. Hm yeah I realized this when I read patches 3 & 4. I would to like this: 1. Add a new generic property writeprotect-gpios that mandates to use GPIO_ACTIVE_LOW and use this in the new example 2. Deprecate wp-gpios in the binding, keep it around but deprecated. 3. Add a quirk to gpiolib-of in the manner of the other quirks there (like for SPI) so that if we are dealing with some EEPROM node like at24 and the flag is zero, tag on GPIO_ACTIVE_LOW on the descriptor. The driver will now handle the semantic of both cases with gpiolib-of providing a quirk for the old binding. This is how we solved this type of problem before. Yours, Linus Walleij