Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3640528imm; Wed, 5 Sep 2018 03:39:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbJ8O5+yz86FL4lKAIzdX0+vYiqFSpSF1g/POZPsLjRy7B5N02OoNzh0gWsBmpEQh5S3Gmk X-Received: by 2002:a63:d518:: with SMTP id c24-v6mr34417482pgg.357.1536143959509; Wed, 05 Sep 2018 03:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536143959; cv=none; d=google.com; s=arc-20160816; b=OV+pOPVy7jIIWw18BJNzp4eUD9hQnoojE1rSSbhkvlsG72a5qQVCUV+3Fzhvlx1bl0 KoX65Z0q5+7TO5tIfVlz6Wc3O7KwOMnX5OhTchiHfb7FdecfdmV13mPMGEZv5NVLk2J+ Cpw0XaTgqXBzCD0aQjCXzjNG3tVPfl5f2Rh5YZEGfEW4lt7aQL6V/9Oq35xUo7XYA9QB hgj9y1HFjT63miL4GiV4CJDOlOPF/+6THiWS6jzpcsw4z6WahzZN+DnkG71d99GwlepS 2dL890sb0xCwMV0j6InrSGOoNke1TrrYfFlBlizPPxsA6+TqLxIkwvzPLmJYx6jHUMKn G0KQ== 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=YVNFoIZXHwSjSyG/EAYj/Cfc4ha2Z3R4Xtv1AfGLQLM=; b=HNOK5JHIBz8PsCi9cv+cOFeU3d/XaIYSNaDitblQuRUJWvf/KtDpz6B5A8avkvpu51 X5K8EyCs/gTQ7O6Hi9ngc7C5VNFTg8Kl+gjRcqJQi35RkSCX6HVKGsTYiTiOT2wENsTs NVswy8SAUfSTUQ3KHzQtABKR1Wk1j3xC6gMWd0ZaAnO+HlATGTJY96/sxW04rVRp3GLQ 38Kq5ru3t23nqNBm3kOX80Ghu7T3iHK7vDOBX5b/7JWyHg9gbxQG8L9Mx8A+eSpo87vT LvOGtspdh7EARbG8MsQBjq69W+UrDK6uGG9qjArmsHMTo6oRs5FxXJ+N6vHi/N31oxVd fvCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OwV1kXR3; 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 r124-v6si1818893pfc.202.2018.09.05.03.39.04; Wed, 05 Sep 2018 03:39:19 -0700 (PDT) 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=OwV1kXR3; 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 S1727853AbeIEPHf (ORCPT + 99 others); Wed, 5 Sep 2018 11:07:35 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:50390 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727627AbeIEPHf (ORCPT ); Wed, 5 Sep 2018 11:07:35 -0400 Received: by mail-it0-f67.google.com with SMTP id j81-v6so9216715ite.0 for ; Wed, 05 Sep 2018 03:37:58 -0700 (PDT) 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=YVNFoIZXHwSjSyG/EAYj/Cfc4ha2Z3R4Xtv1AfGLQLM=; b=OwV1kXR3QhVXX4eaEj0RN8Z7nT4eBILTAX1DjTlY8QljyV2pnU4WDaUZh6i35ltvnc A5FfcdrKyOW2Dn4zULDTkHQ1gkuN3mqv6NlmnUFuQ+PcyKCiTHviU6MA55WciRCjvIoQ WdRCTRygsXJ9Wu/ogWWySbZSdzAOLoIaOhM9A= 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=YVNFoIZXHwSjSyG/EAYj/Cfc4ha2Z3R4Xtv1AfGLQLM=; b=I62an1hqu4ewXOBOduZs92nwfHko5pQUPXr3DZSH80Z5ihyA9ZzS/fwoDZsJh01ACK 7o085kDwe2X+r3kVHgM/X1tjB0znI/AsuRK/QVEZKWnduUH0O9ecMYIAmxGZLFfwP8dQ TApyJcmhDbDaRK291nnKU5mb9gwnlVGZ3ZcGWG/XrBEvWpwQBX3T/4oaXR5cOlDgtzP7 zCqG1ePXrbRbHeM/DOEIOHrnza75PL0gH11bVKNxiywJnw1ewHxfn0epeJwEe6+zrRkq n4tUwDG+HorANsA6O50lEQwvkVmV9M6fnXTIb9SLGy3M3PQbfI2pvcRmIJdxr6n6O3N1 Zthg== X-Gm-Message-State: APzg51C+t94F2J2LYgulNa+cwKXox5sX0wdGNsDjnbhPdCiiN4fv2Fc0 DgiHdTPoN1qy+Sii6qcgJrt4QuKGbTqqr6I0YgmE+Q== X-Received: by 2002:a24:1f06:: with SMTP id d6-v6mr3065854itd.54.1536143878242; Wed, 05 Sep 2018 03:37:58 -0700 (PDT) MIME-Version: 1.0 References: <20180831191326.25106-1-afd@ti.com> <20180831191326.25106-2-afd@ti.com> <2a02c241-ac91-1bac-380d-122858bb03c3@ti.com> In-Reply-To: <2a02c241-ac91-1bac-380d-122858bb03c3@ti.com> From: Linus Walleij Date: Wed, 5 Sep 2018 12:37:47 +0200 Message-ID: Subject: Re: [PATCH 2/5] gpio: davinci: Use dev name for label and automatic base selection To: Keerthy Cc: "Andrew F. Davis" , "Nori, Sekhar" , Kevin Hilman , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" 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 Mon, Sep 3, 2018 at 7:40 AM Keerthy wrote: > On Saturday 01 September 2018 12:43 AM, Andrew F. Davis wrote: > > Use dev_name to get a unique label and use -1 for a base to get our > > selection automatically. We pull in all GPIOs per chip now so this > > does not have the effect of out of order labels like before. > > > > We do these both together so we can drop all the static data in one > > patch. This also lets us normalize the return paths as we don't need > > any cleanup after this change. > > echo 28 > /sys/class/gpio/export > / # echo 28 > /sys/class/gpi[ 12.839205] export_store: invalid GPIO 28 > o/export > echo 2 > /sys/class/gp[ 22.165728] export_store: invalid GPIO 2 > io/export > / # echo 1 > /sys/class/gp[ 25.961392] export_store: invalid GPIO 1 > io/export > / # echo 3 > /sys/class/gp[ 29.981918] export_store: invalid GPIO 3 > io/export > > Export fails with this patch. I am testing this on keystone-k2g-evm. I think the GPIO got a new number didn't it? Did you check the gpio file in debugfs to see which number it got. This is sadly the global numberspace that we are tying to get rid of (new apps/scripts should use the chardev). Are there applications that rely on the sysfs ABI on DaVinci? In that case base needs to be prerseved. Yours, Linus Walleij