[{"id":1769981,"web_url":"http://patchwork.ozlabs.org/comment/1769981/","msgid":"<20170918083629.qn4dlrmk7ffipfsz@dell>","list_archive_url":null,"date":"2017-09-18T08:36:29","subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","submitter":{"id":12720,"url":"http://patchwork.ozlabs.org/api/people/12720/","name":"Lee Jones","email":"lee.jones@linaro.org"},"content":"On Sun, 17 Sep 2017, Linus Walleij wrote:\n\n> This converts the GPIO-based I2C-driver to using GPIO\n> descriptors instead of the old global numberspace-based\n> GPIO interface. We:\n\n[STUFF]\n\n> - The MFD Silicon Motion SM501 is a special case. It dynamically\n>   spawns an I2C bus off the MFD using sm501_create_subdev().\n>   We use an approach to dynamically create a machine descriptor\n>   table and attach this to the \"SM501-LOW\" or \"SM501-HIGH\"\n>   gpiochip. We use chip-local offsets to grab the right lines.\n>   We can get rid of two local static inline helpers as part\n>   of this refactoring.\n> \n> Cc: Steven Miao <realmz6@gmail.com>\n> Cc: Ralf Baechle <ralf@linux-mips.org>\n> Cc: Lee Jones <lee.jones@linaro.org>\n> Cc: Guenter Roeck <linux@roeck-us.net>\n> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>\n> Cc: Magnus Damm <magnus.damm@gmail.com>\n> Cc: Ben Dooks <ben.dooks@codethink.co.uk>\n> Cc: Heiko Schocher <hs@denx.de>\n> Acked-by: Olof Johansson <olof@lixom.net>\n> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>\n> ---\n> ChangeLog v1->v2:\n> - Fix a minor typo in error path (scl was sda from copy-paste)\n> - Collected Olof's ACK\n> \n> Steven (Blackfin): requesting ACK for Wolfram to take this patch.\n> Ralf (MIPS): requesting ACK for Wolfram to take this patch.\n> Lee: requesting ACK for Wolfram to take this patch.\n\nThis ...\n\n> SM501 users: requesting Tested-by on this patch.\n\n... loosely depends on this (until it doesn't).","headers":{"Return-Path":"<linux-i2c-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"JLZhB2E+\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwfVq27n6z9s7M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 18:36:35 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751568AbdIRIgd (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tMon, 18 Sep 2017 04:36:33 -0400","from mail-wr0-f174.google.com ([209.85.128.174]:47993 \"EHLO\n\tmail-wr0-f174.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750998AbdIRIgd (ORCPT\n\t<rfc822; linux-i2c@vger.kernel.org>); Mon, 18 Sep 2017 04:36:33 -0400","by mail-wr0-f174.google.com with SMTP id k20so5575222wre.4\n\tfor <linux-i2c@vger.kernel.org>; Mon, 18 Sep 2017 01:36:32 -0700 (PDT)","from dell ([2.27.167.120]) by smtp.gmail.com with ESMTPSA id\n\tf5sm4929078wmg.10.2017.09.18.01.36.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 18 Sep 2017 01:36:31 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=HstyGEfXQC8OQ5uowO99SVT9LXS5lGU+bP+avqJvkho=;\n\tb=JLZhB2E+sOXsJEOZKeJ2VeRIjnmOq2axVAZGsRknBM8gppVHBtufqA2QM5WDbnM5Z5\n\trWoeVRHsYty+07EU956A6zOA+uSPocIqVm+FHJEKLx9/hKgkWkLq06/18qbcJRyzX1X/\n\tJgKTu6HxK2+mfISL3yAWipl9pOWYomM8gcWu0=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=HstyGEfXQC8OQ5uowO99SVT9LXS5lGU+bP+avqJvkho=;\n\tb=rGDIn8YGovvlubqmHdqmkSEgXhf3atpRuGgcnmzSSR/WIgrG9Qhn8kbKiWnKpukVHq\n\tVQXqaQ+O7rhXWtds+kKEeZrz8a7WxGA0nz82VPww1sylwFeKzHNdWK2sv+iGPtHPLf1m\n\t0pUtjxlFknE8eyXVLHVs0SJTwABDwZNTnupUrOGZJvqi1QLKm5jXTPxUt7iF5TGj+YEo\n\tqFsCCgCFMrcS6FryEUi/7PSyfC+h5jb3zTjo9wJguFZl7Ihso+7R++AG1/ViLqxDHJUw\n\tGglGX34LTioQSuIzOt3ZSvQQzjvbHr+twHW98l3zdLrsHB9CoCDm8spukMbg/pEJmHWx\n\tQSbQ==","X-Gm-Message-State":"AHPjjUjaPR3klv+fY1q4pkFZrjqUbkaQe7oczdf5v56yNJbrN1fcejZ1\n\trVXP9W/V5QRq+0Ad","X-Google-Smtp-Source":"ADKCNb46KVzRCH0ZDlSgOoPdhuC0HUFD1XIZsZpQKX3DWKHyrmgXK0HYvEkj/8vHbwf/jHf5SZ2IFQ==","X-Received":"by 10.223.195.144 with SMTP id\n\tp16mr30841274wrf.123.1505723792017; \n\tMon, 18 Sep 2017 01:36:32 -0700 (PDT)","Date":"Mon, 18 Sep 2017 09:36:29 +0100","From":"Lee Jones <lee.jones@linaro.org>","To":"Linus Walleij <linus.walleij@linaro.org>","Cc":"Wolfram Sang <wsa@the-dreams.de>, linux-i2c@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, \n\tadi-buildroot-devel@lists.sourceforge.net, Geert Uytterhoeven\n\t<geert@linux-m68k.org>,         Steven Miao <realmz6@gmail.com>,\n\tRalf Baechle <ralf@linux-mips.org>, \n\tGuenter Roeck <linux@roeck-us.net>, Ville =?iso-8859-1?q?Syrj=E4l=E4?=\n\t<ville.syrjala@linux.intel.com>, Magnus Damm <magnus.damm@gmail.com>, \n\tBen Dooks <ben.dooks@codethink.co.uk>, Heiko Schocher <hs@denx.de>","Subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","Message-ID":"<20170918083629.qn4dlrmk7ffipfsz@dell>","References":"<20170917093906.16325-1-linus.walleij@linaro.org>\n\t<20170917093906.16325-2-linus.walleij@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20170917093906.16325-2-linus.walleij@linaro.org>","User-Agent":"NeoMutt/20170113 (1.7.2)","Sender":"linux-i2c-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-i2c.vger.kernel.org>","X-Mailing-List":"linux-i2c@vger.kernel.org"}},{"id":1770427,"web_url":"http://patchwork.ozlabs.org/comment/1770427/","msgid":"<CACRpkdb8jDRZxuTUNoosLORqDbF4PP4RSHj3avtUqzvW2RwpmQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-18T19:00:18","subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","submitter":{"id":7055,"url":"http://patchwork.ozlabs.org/api/people/7055/","name":"Linus Walleij","email":"linus.walleij@linaro.org"},"content":"On Mon, Sep 18, 2017 at 10:36 AM, Lee Jones <lee.jones@linaro.org> wrote:\n> On Sun, 17 Sep 2017, Linus Walleij wrote:\n\n>> Lee: requesting ACK for Wolfram to take this patch.\n>\n> This ...\n>\n>> SM501 users: requesting Tested-by on this patch.\n>\n> ... loosely depends on this (until it doesn't).\n\nYeah I did my best to scout around the commit logs\nto figure out who's been contributing to the SM501 and\nusing it, I hope someone will step up and test it.\n\nLinus","headers":{"Return-Path":"<linux-i2c-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"DHjg//ou\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwwLd50W5z9s7p\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 05:00:25 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750711AbdIRTAY (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tMon, 18 Sep 2017 15:00:24 -0400","from mail-io0-f176.google.com ([209.85.223.176]:46758 \"EHLO\n\tmail-io0-f176.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752772AbdIRTAX (ORCPT\n\t<rfc822; linux-i2c@vger.kernel.org>); Mon, 18 Sep 2017 15:00:23 -0400","by mail-io0-f176.google.com with SMTP id d16so4566164ioj.3\n\tfor <linux-i2c@vger.kernel.org>; Mon, 18 Sep 2017 12:00:22 -0700 (PDT)","by 10.79.164.78 with HTTP; Mon, 18 Sep 2017 12:00:18 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=6nLP9K73TIQJcdlvY3qC0XE//y6fHOI4ylTAtAJv73g=;\n\tb=DHjg//ouDjQD2AWZ347gq5CbmdiRtsSUOg0WUSXdr00L/6aNYhIfHPMsyqsVW2fbgt\n\tSf/n6op+vPLct1lxxyv65VhqNgCzGYuicQG/n0aiXU7vC/4BJ6snQ/fB6oOJV9FxmG4T\n\t/EjrS1oflj07Utzw95yO1yNxMKNj/oY3Q0fas=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=6nLP9K73TIQJcdlvY3qC0XE//y6fHOI4ylTAtAJv73g=;\n\tb=EKFoP+vK4mjX2ygeyf38JLjnc3rf6etF1w5stmFPA1QTNJY2STbxFTNloa2L0zFIf3\n\tgkVo2O4TuvST/C8wolU1RMtZsOchWOYnlLBpNd+pnDUZ3N0NT/3y8zLJ9dQzIzQ9cwcX\n\tesPCzxBAYDmDpDoyHLHDoOtKOymwdpMm9FFcoivoFxeycwuckCDGp1d5eQgVAN0Sb5Tq\n\tsbPznad+aG+vhEtOzI/6rQ/ToKwfRJKk+DMAVvfnPiTWmLNayQdPB7VadPB09M9afQzA\n\tsXqNRJeE76HmACMAx6iDuKjGN533Z13vxLJImM+JHOecjTQWwqtbdH8f4ykxLCii4Z46\n\tY0Sw==","X-Gm-Message-State":"AHPjjUgRa1RGbZsXzei+OII40O9MzMqoKfWzGGkL+YdZawPZMkrBTsY3\n\thECtn7CWfBE67F5bq/xTVYDsK/xKFJcu2+qm6855xQ==","X-Google-Smtp-Source":"AOwi7QDRKe3IPmSNudMnBNNYHuv25Gl5oB9lL8fgLGdI/xWqnVKBOjikV/zFKoZxYOhdMxNHoHtPucU+K8oKEWQX8uI=","X-Received":"by 10.107.197.198 with SMTP id\n\tv189mr21945457iof.94.1505761219864; \n\tMon, 18 Sep 2017 12:00:19 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170918083629.qn4dlrmk7ffipfsz@dell>","References":"<20170917093906.16325-1-linus.walleij@linaro.org>\n\t<20170917093906.16325-2-linus.walleij@linaro.org>\n\t<20170918083629.qn4dlrmk7ffipfsz@dell>","From":"Linus Walleij <linus.walleij@linaro.org>","Date":"Mon, 18 Sep 2017 21:00:18 +0200","Message-ID":"<CACRpkdb8jDRZxuTUNoosLORqDbF4PP4RSHj3avtUqzvW2RwpmQ@mail.gmail.com>","Subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","To":"Lee Jones <lee.jones@linaro.org>","Cc":"Wolfram Sang <wsa@the-dreams.de>, \"linux-i2c@vger.kernel.org\"\n\t<linux-i2c@vger.kernel.org>, \"linux-arm-kernel@lists.infradead.org\" \n\t<linux-arm-kernel@lists.infradead.org>, Linux MIPS\n\t<linux-mips@linux-mips.org>, adi-buildroot-devel@lists.sourceforge.net, \n\tGeert Uytterhoeven <geert@linux-m68k.org>, \n\tSteven Miao <realmz6@gmail.com>, Ralf Baechle <ralf@linux-mips.org>, \n\tGuenter Roeck <linux@roeck-us.net>, =?utf-8?q?Ville_Syrj=C3=A4?=\n\t=?utf-8?b?bMOk?= <ville.syrjala@linux.intel.com>,\n\tMagnus Damm <magnus.damm@gmail.com>, Ben Dooks\n\t<ben.dooks@codethink.co.uk>,         Heiko Schocher <hs@denx.de>","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"linux-i2c-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-i2c.vger.kernel.org>","X-Mailing-List":"linux-i2c@vger.kernel.org"}},{"id":1770797,"web_url":"http://patchwork.ozlabs.org/comment/1770797/","msgid":"<42702eb3-d1dd-5dd0-dbd6-ac163bcc27c2@codethink.co.uk>","list_archive_url":null,"date":"2017-09-19T09:19:52","subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","submitter":{"id":14023,"url":"http://patchwork.ozlabs.org/api/people/14023/","name":"Ben Dooks","email":"ben.dooks@codethink.co.uk"},"content":"On 18/09/17 20:00, Linus Walleij wrote:\n> On Mon, Sep 18, 2017 at 10:36 AM, Lee Jones <lee.jones@linaro.org> wrote:\n>> On Sun, 17 Sep 2017, Linus Walleij wrote:\n> \n>>> Lee: requesting ACK for Wolfram to take this patch.\n>>\n>> This ...\n>>\n>>> SM501 users: requesting Tested-by on this patch.\n>>\n>> ... loosely depends on this (until it doesn't).\n> \n> Yeah I did my best to scout around the commit logs\n> to figure out who's been contributing to the SM501 and\n> using it, I hope someone will step up and test it.\n\nI don't know if anything I have available working has an\nSM501 on it. We did a couple of boards with S3C2440 and\nan SM501 connected via external IO. However these have\nnot been supported in years (since Simtec)\n\nI don't even think I have the PCI SM501 kit, that may have\nended up either at Simtec or one of the other engineers.","headers":{"Return-Path":"<linux-i2c-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xxJ0t4JrXz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 19:46:22 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751795AbdISJqU (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 19 Sep 2017 05:46:20 -0400","from imap1.codethink.co.uk ([176.9.8.82]:55919 \"EHLO\n\timap1.codethink.co.uk\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751788AbdISJqT (ORCPT\n\t<rfc822; linux-i2c@vger.kernel.org>); Tue, 19 Sep 2017 05:46:19 -0400","from [185.98.148.236] (helo=[0.0.0.0])\n\tby imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian))\n\tid 1duEh7-0005KT-Ug; Tue, 19 Sep 2017 10:19:54 +0100"],"X-Greylist":"delayed 1539 seconds by postgrey-1.27 at vger.kernel.org;\n\tTue, 19 Sep 2017 05:46:19 EDT","Subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","To":"Linus Walleij <linus.walleij@linaro.org>,\n\tLee Jones <lee.jones@linaro.org>","Cc":"Wolfram Sang <wsa@the-dreams.de>, \"linux-i2c@vger.kernel.org\"\n\t<linux-i2c@vger.kernel.org>, \"linux-arm-kernel@lists.infradead.org\" \n\t<linux-arm-kernel@lists.infradead.org>, Linux MIPS\n\t<linux-mips@linux-mips.org>, adi-buildroot-devel@lists.sourceforge.net, \n\tGeert Uytterhoeven <geert@linux-m68k.org>, \n\tSteven Miao <realmz6@gmail.com>, Ralf Baechle <ralf@linux-mips.org>, \n\tGuenter Roeck <linux@roeck-us.net>, =?utf-8?q?Ville_Syrj=C3=A4?=\n\t=?utf-8?b?bMOk?= <ville.syrjala@linux.intel.com>,\n\tMagnus Damm <magnus.damm@gmail.com>,         Heiko Schocher <hs@denx.de>","References":"<20170917093906.16325-1-linus.walleij@linaro.org>\n\t<20170917093906.16325-2-linus.walleij@linaro.org>\n\t<20170918083629.qn4dlrmk7ffipfsz@dell>\n\t<CACRpkdb8jDRZxuTUNoosLORqDbF4PP4RSHj3avtUqzvW2RwpmQ@mail.gmail.com>","From":"Ben Dooks <ben.dooks@codethink.co.uk>","Organization":"Codethink Limited.","Message-ID":"<42702eb3-d1dd-5dd0-dbd6-ac163bcc27c2@codethink.co.uk>","Date":"Tue, 19 Sep 2017 10:19:52 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<CACRpkdb8jDRZxuTUNoosLORqDbF4PP4RSHj3avtUqzvW2RwpmQ@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Sender":"linux-i2c-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-i2c.vger.kernel.org>","X-Mailing-List":"linux-i2c@vger.kernel.org"}},{"id":1778130,"web_url":"http://patchwork.ozlabs.org/comment/1778130/","msgid":"<CACRpkdZ=BZHp3mjccUYaPTuMbXgwGSErvLprnp4j0H+7C5NYJQ@mail.gmail.com>","list_archive_url":null,"date":"2017-10-02T01:05:22","subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","submitter":{"id":7055,"url":"http://patchwork.ozlabs.org/api/people/7055/","name":"Linus Walleij","email":"linus.walleij@linaro.org"},"content":"On Sun, Sep 17, 2017 at 11:39 AM, Linus Walleij\n<linus.walleij@linaro.org> wrote:\n\n> - The MFD Silicon Motion SM501 is a special case. It dynamically\n>   spawns an I2C bus off the MFD using sm501_create_subdev().\n>   We use an approach to dynamically create a machine descriptor\n>   table and attach this to the \"SM501-LOW\" or \"SM501-HIGH\"\n>   gpiochip. We use chip-local offsets to grab the right lines.\n>   We can get rid of two local static inline helpers as part\n>   of this refactoring.\n(...)\n> SM501 users: requesting Tested-by on this patch.\n\nPaging Simtec (if it reaches anyone), Vincent Sanders,\nTeddy Wang at Silicon Motion:\n\nDoes any of you have an \"Anubis\" board so you can test GPIO\non this board before/after this patch and see if it checks out right?\n\nI guess it's this board:\nhttp://www.simtec.co.uk/products/BBD20EUROA/\n\nDoes anyone know of a commercially obtainable product using\nSM501 with reasonable mainline Linux support so I can test it myself?\n\nGetting a bit desperate...\n\nYours,\nLinus Walleij","headers":{"Return-Path":"<linux-i2c-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"TAgPkHMr\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y53qn4T8Hz9t2m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  2 Oct 2017 12:05:25 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751357AbdJBBFY (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tSun, 1 Oct 2017 21:05:24 -0400","from mail-io0-f171.google.com ([209.85.223.171]:54613 \"EHLO\n\tmail-io0-f171.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751148AbdJBBFX (ORCPT\n\t<rfc822;linux-i2c@vger.kernel.org>); Sun, 1 Oct 2017 21:05:23 -0400","by mail-io0-f171.google.com with SMTP id h66so3587445ioh.11\n\tfor <linux-i2c@vger.kernel.org>; Sun, 01 Oct 2017 18:05:23 -0700 (PDT)","by 10.79.6.195 with HTTP; Sun, 1 Oct 2017 18:05:22 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=YdiEDqkHt02u1pb+caHosMt4TmWpdDZco/TUnhb0heI=;\n\tb=TAgPkHMrPOtP77ntmXVAS51q+I8Sb3dBhvMcqIlMkXPYMGcLoiiN9/J6K9Ek9m2zd9\n\tHMRxgwD/pacKWklQjKlHNbCM7wUM2hEer1zQKd8K2zZcOaUpa2iRDzSxdY6Rob65Puv9\n\tihfA5+qnQuzH2PuP6bPoKlYSK65jARamf8UwU=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=YdiEDqkHt02u1pb+caHosMt4TmWpdDZco/TUnhb0heI=;\n\tb=fnmUogRBeMSa6JSwC3YcLcBy1nTlzLv0VLBWbpgy28v15sMDPlcuatYgPSMQqvqE1P\n\t+7HarHqE4XnD1I9ZWdsZP/eW6SUg0d4crIsUNIKBSdr+4QhC2o3isLQG7yi8WREGYL1l\n\tbwrcQ2/tTbv3d9v7F9UXebPY8EIHtTbI7yLZwRDYrmZ7zhyaWnVJtyBJjxTw15eavBCi\n\tDOqmnS1vsYtE66Z8MAyC3KuiOGYgSLNHW0t8ZCKvHn8LQVgy324wvKPvsYuUNF1n84T5\n\t4cfIy3QsFjqIyH1UG7hYmIT1baDC/7Ae9S3+mQACe5AB9jWyRK+pc3IIuhJVfnP53Zhc\n\tjl7Q==","X-Gm-Message-State":"AMCzsaV9zAPxWycONfRRUCYE0zvH4tkQQ8pFVJP8N2bu17LTpp+Lhsx1\n\teC4EvKTxmbl/rWwkrwN+E1LTLdYSiy2/l77BFdnLkg==","X-Google-Smtp-Source":"AOwi7QAIUn2aBibG+Lblm9J7oscafQAUvCRhGeVzP9Y3Z7UcZ1AxLvXSkIGkOtBKlOve6pBzJjRLrq0IDtVvAAngcE4=","X-Received":"by 10.107.22.65 with SMTP id 62mr22943857iow.269.1506906322843; \n\tSun, 01 Oct 2017 18:05:22 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170917093906.16325-2-linus.walleij@linaro.org>","References":"<20170917093906.16325-1-linus.walleij@linaro.org>\n\t<20170917093906.16325-2-linus.walleij@linaro.org>","From":"Linus Walleij <linus.walleij@linaro.org>","Date":"Mon, 2 Oct 2017 03:05:22 +0200","Message-ID":"<CACRpkdZ=BZHp3mjccUYaPTuMbXgwGSErvLprnp4j0H+7C5NYJQ@mail.gmail.com>","Subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","To":"Wolfram Sang <wsa@the-dreams.de>,\n\t\"linux-i2c@vger.kernel.org\" <linux-i2c@vger.kernel.org>,\n\tSimtec Linux Team <linux@simtec.co.uk>,\n\tVincent Sanders <vincent.sanders@collabora.co.uk>,\n\tVincent Sanders <vince@kyllikki.org>,\n\tTeddy Wang <teddy.wang@siliconmotion.com>","Cc":"\"linux-arm-kernel@lists.infradead.org\" \n\t<linux-arm-kernel@lists.infradead.org>, Linux MIPS\n\t<linux-mips@linux-mips.org>, adi-buildroot-devel@lists.sourceforge.net, \n\tGeert Uytterhoeven <geert@linux-m68k.org>, \n\tLinus Walleij <linus.walleij@linaro.org>,\n\tSteven Miao <realmz6@gmail.com>, Ralf Baechle <ralf@linux-mips.org>,\n\tLee Jones <lee.jones@linaro.org>, Guenter Roeck <linux@roeck-us.net>,\n\t=?utf-8?b?VmlsbGUgU3lyasOkbMOk?= <ville.syrjala@linux.intel.com>,\n\tMagnus Damm <magnus.damm@gmail.com>, Ben Dooks\n\t<ben.dooks@codethink.co.uk>,         Heiko Schocher <hs@denx.de>","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"linux-i2c-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-i2c.vger.kernel.org>","X-Mailing-List":"linux-i2c@vger.kernel.org"}},{"id":1778438,"web_url":"http://patchwork.ozlabs.org/comment/1778438/","msgid":"<3100653b-21b7-0a84-6379-7c38e18e2dd6@codethink.co.uk>","list_archive_url":null,"date":"2017-10-02T16:11:00","subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","submitter":{"id":14023,"url":"http://patchwork.ozlabs.org/api/people/14023/","name":"Ben Dooks","email":"ben.dooks@codethink.co.uk"},"content":"On 02/10/17 02:05, Linus Walleij wrote:\n> On Sun, Sep 17, 2017 at 11:39 AM, Linus Walleij\n> <linus.walleij@linaro.org> wrote:\n> \n>> - The MFD Silicon Motion SM501 is a special case. It dynamically\n>>    spawns an I2C bus off the MFD using sm501_create_subdev().\n>>    We use an approach to dynamically create a machine descriptor\n>>    table and attach this to the \"SM501-LOW\" or \"SM501-HIGH\"\n>>    gpiochip. We use chip-local offsets to grab the right lines.\n>>    We can get rid of two local static inline helpers as part\n>>    of this refactoring.\n> (...)\n>> SM501 users: requesting Tested-by on this patch.\n> \n> Paging Simtec (if it reaches anyone), Vincent Sanders,\n> Teddy Wang at Silicon Motion:\n\nI'm fairly sure Simtec is not currently active. See below.\nI have no idea if the SM501 is even available for current designs.\n\n> Does any of you have an \"Anubis\" board so you can test GPIO\n> on this board before/after this patch and see if it checks out right?\n> \n> I guess it's this board:\n> http://www.simtec.co.uk/products/BBD20EUROA/\n\nI think that's fairly close.\nWe did have a couple of other designs done for clients, but they may\nnot have been available to the general public.\n\n> \n> Does anyone know of a commercially obtainable product using\n> SM501 with reasonable mainline Linux support so I can test it myself?\n> \n> Getting a bit desperate...\n\nAt the moment I have no time to go through the boxes of ex-Simtec stuff\nthat I still have... quite a lot of my old Simtec stuff has already been\nrecycled as it has been over five years since leaving.\n\n> Yours,\n> Linus Walleij\n>","headers":{"Return-Path":"<linux-i2c-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y5Ry33Nq7z9t5s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  3 Oct 2017 03:12:11 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751964AbdJBQMK (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tMon, 2 Oct 2017 12:12:10 -0400","from imap1.codethink.co.uk ([176.9.8.82]:50968 \"EHLO\n\timap1.codethink.co.uk\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751801AbdJBQMJ (ORCPT\n\t<rfc822;linux-i2c@vger.kernel.org>); Mon, 2 Oct 2017 12:12:09 -0400","from [185.98.148.236] (helo=[0.0.0.0])\n\tby imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian))\n\tid 1dz3J9-0000oD-72; Mon, 02 Oct 2017 17:11:03 +0100"],"Subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","To":"Linus Walleij <linus.walleij@linaro.org>,\n\tWolfram Sang <wsa@the-dreams.de>,\n\t\"linux-i2c@vger.kernel.org\" <linux-i2c@vger.kernel.org>,\n\tSimtec Linux Team <linux@simtec.co.uk>,\n\tVincent Sanders <vincent.sanders@collabora.co.uk>,\n\tVincent Sanders <vince@kyllikki.org>,\n\tTeddy Wang <teddy.wang@siliconmotion.com>","Cc":"\"linux-arm-kernel@lists.infradead.org\" \n\t<linux-arm-kernel@lists.infradead.org>, Linux MIPS\n\t<linux-mips@linux-mips.org>, adi-buildroot-devel@lists.sourceforge.net, \n\tGeert Uytterhoeven <geert@linux-m68k.org>, \n\tSteven Miao <realmz6@gmail.com>, Ralf Baechle <ralf@linux-mips.org>, \n\tLee Jones <lee.jones@linaro.org>, Guenter Roeck <linux@roeck-us.net>, \n\t=?utf-8?b?VmlsbGUgU3lyasOkbMOk?= <ville.syrjala@linux.intel.com>,\n\tMagnus Damm <magnus.damm@gmail.com>,         Heiko Schocher <hs@denx.de>","References":"<20170917093906.16325-1-linus.walleij@linaro.org>\n\t<20170917093906.16325-2-linus.walleij@linaro.org>\n\t<CACRpkdZ=BZHp3mjccUYaPTuMbXgwGSErvLprnp4j0H+7C5NYJQ@mail.gmail.com>","From":"Ben Dooks <ben.dooks@codethink.co.uk>","Organization":"Codethink Limited.","Message-ID":"<3100653b-21b7-0a84-6379-7c38e18e2dd6@codethink.co.uk>","Date":"Mon, 2 Oct 2017 17:11:00 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<CACRpkdZ=BZHp3mjccUYaPTuMbXgwGSErvLprnp4j0H+7C5NYJQ@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Sender":"linux-i2c-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-i2c.vger.kernel.org>","X-Mailing-List":"linux-i2c@vger.kernel.org"}},{"id":1779669,"web_url":"http://patchwork.ozlabs.org/comment/1779669/","msgid":"<20171004105703.qmahtqieimw4kn3p@dell>","list_archive_url":null,"date":"2017-10-04T10:57:03","subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","submitter":{"id":12720,"url":"http://patchwork.ozlabs.org/api/people/12720/","name":"Lee Jones","email":"lee.jones@linaro.org"},"content":"On Sun, 17 Sep 2017, Linus Walleij wrote:\n\n> This converts the GPIO-based I2C-driver to using GPIO\n> descriptors instead of the old global numberspace-based\n> GPIO interface. We:\n> \n> - Convert the driver to unconditionally grab two GPIOs\n>   from the device by index 0 (SDA) and 1 (SCL) which\n>   will work fine with device tree and descriptor tables.\n>   The existing device trees will continue to work just\n>   like before, but without any roundtrip through the\n>   global numberspace.\n> \n> - Brutally convert all boardfiles still passing global\n>   GPIOs by registering descriptor tables associated with\n>   the devices instead so this driver does not need to keep\n>   supporting passing any GPIO numbers as platform data.\n> \n> There is no stepwise approach as elegant as this, I\n> strongly prefer this big hammer over any antsteps for this\n> conversion. This way the old GPIO numbers go away and\n> NEVER COME BACK.\n> \n> Special conversion for the different boards utilizing\n> I2C-GPIO:\n> \n> - EP93xx (arch/arm/mach-ep93xx): pretty straight forward as\n>   all boards were using the same two GPIO lines, just define\n>   these two in a lookup table for \"i2c-gpio\" and register\n>   these along with the device. None of them define any\n>   other platform data so just pass NULL as platform data.\n>   This platform selects GPIOLIB so all should be smooth.\n>   The pins appear on a gpiochip for bank \"G\" as pins 1 (SDA)\n>   and 0 (SCL).\n> \n> - IXP4 (arch/arm/mach-ixp4): descriptor tables have to\n>   be registered for each board separately. They all use\n>   \"IXP4XX_GPIO_CHIP\" so it is pretty straight forward.\n>   Most board define no other platform data than SCL/SDA\n>   so they can drop the #include of <linux/i2c-gpio.h> and\n>   assign NULL to platform data.\n> \n>   The \"goramo_mlr\" (Goramo Multilink Router) board is a bit\n>   worrisome: it implements its own I2C bit-banging in the\n>   board file, and optionally registers an I2C serial port,\n>   but claims the same GPIO lines for itself in the board file.\n>   This is not going to work: there will be competition for the\n>   GPIO lines, so delete the optional extra I2C bus instead, no\n>   I2C devices are registered on it anyway, there are just hints\n>   that it may contain an EEPROM that may be accessed from\n>   userspace. This needs to be fixed up properly by the serial\n>   clock using I2C emulation so drop a note in the code.\n> \n> - KS8695 board acs5k (arch/arm/mach-ks8695/board-acs5.c)\n>   has some platform data in addition to the pins so it needs to\n>   be kept around sans GPIO lines. Its GPIO chip is named\n>   \"KS8695\" and the arch selects GPIOLIB.\n> \n> - PXA boards (arch/arm/mach-pxa/*) use some of the platform\n>   data so it needs to be preserved here. The viper board even\n>   registers two GPIO I2Cs. The gpiochip is named \"gpio-pxa\" and\n>   the arch selects GPIOLIB.\n> \n> - SA1100 Simpad (arch/arm/mach-sa1100/simpad.c) defines a GPIO\n>   I2C bus, and the arch selects GPIOLIB.\n> \n> - Blackfin boards (arch/blackfin/bf533 etc) for these I assume\n>   their I2C GPIOs refer to the local gpiochip defined in\n>   arch/blackfin/kernel/bfin_gpio.c names \"BFIN-GPIO\".\n>   The arch selects GPIOLIB. The boards get spiked with\n>   IF_ENABLED(I2C_GPIO) but that is a side effect of it\n>   being like that already (I would just have Kconfig select\n>   I2C_GPIO and get rid of them all.) I also delete any\n>   platform data set to 0 as it will get that value anyway\n>   from static declartions of platform data.\n> \n> - The MIPS selects GPIOLIB and the Alchemy machine is using\n>   two local GPIO chips, one of them has a GPIO I2C. We need\n>   to adjust the local offset from the global number space here.\n>   The ATH79 has a proper GPIO driver in drivers/gpio/gpio-ath79.c\n>   and AFAICT the chip is named \"ath79-gpio\" and the PB44\n>   PCF857x expander spawns from this on GPIO 1 and 0. The latter\n>   board only use the platform data to specify pins so it can be\n>   cut altogether after this.\n> \n> - The MFD Silicon Motion SM501 is a special case. It dynamically\n>   spawns an I2C bus off the MFD using sm501_create_subdev().\n>   We use an approach to dynamically create a machine descriptor\n>   table and attach this to the \"SM501-LOW\" or \"SM501-HIGH\"\n>   gpiochip. We use chip-local offsets to grab the right lines.\n>   We can get rid of two local static inline helpers as part\n>   of this refactoring.\n> \n> Cc: Steven Miao <realmz6@gmail.com>\n> Cc: Ralf Baechle <ralf@linux-mips.org>\n> Cc: Lee Jones <lee.jones@linaro.org>\n> Cc: Guenter Roeck <linux@roeck-us.net>\n> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>\n> Cc: Magnus Damm <magnus.damm@gmail.com>\n> Cc: Ben Dooks <ben.dooks@codethink.co.uk>\n> Cc: Heiko Schocher <hs@denx.de>\n> Acked-by: Olof Johansson <olof@lixom.net>\n> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>\n> ---\n> ChangeLog v1->v2:\n> - Fix a minor typo in error path (scl was sda from copy-paste)\n> - Collected Olof's ACK\n> \n> Steven (Blackfin): requesting ACK for Wolfram to take this patch.\n> Ralf (MIPS): requesting ACK for Wolfram to take this patch.\n> Lee: requesting ACK for Wolfram to take this patch.\n> SM501 users: requesting Tested-by on this patch.\n> ---\n>  arch/arm/mach-ep93xx/core.c                  |  39 ++++----\n>  arch/arm/mach-ep93xx/edb93xx.c               |  15 +--\n>  arch/arm/mach-ep93xx/include/mach/platform.h |   4 +-\n>  arch/arm/mach-ep93xx/simone.c                |  12 +--\n>  arch/arm/mach-ep93xx/snappercl15.c           |  12 +--\n>  arch/arm/mach-ep93xx/vision_ep9307.c         |   7 +-\n>  arch/arm/mach-ixp4xx/avila-setup.c           |  17 +++-\n>  arch/arm/mach-ixp4xx/dsmg600-setup.c         |  16 +++-\n>  arch/arm/mach-ixp4xx/fsg-setup.c             |  16 +++-\n>  arch/arm/mach-ixp4xx/goramo_mlr.c            |  24 ++---\n>  arch/arm/mach-ixp4xx/ixdp425-setup.c         |  16 +++-\n>  arch/arm/mach-ixp4xx/nas100d-setup.c         |  16 +++-\n>  arch/arm/mach-ixp4xx/nslu2-setup.c           |  16 +++-\n>  arch/arm/mach-ks8695/board-acs5k.c           |  13 ++-\n>  arch/arm/mach-pxa/palmz72.c                  |  12 ++-\n>  arch/arm/mach-pxa/viper.c                    |  27 +++++-\n>  arch/arm/mach-sa1100/simpad.c                |  12 ++-\n>  arch/blackfin/mach-bf533/boards/blackstamp.c |  19 +++-\n>  arch/blackfin/mach-bf533/boards/ezkit.c      |  18 +++-\n>  arch/blackfin/mach-bf533/boards/stamp.c      |  18 +++-\n>  arch/blackfin/mach-bf561/boards/ezkit.c      |  18 +++-\n>  arch/mips/alchemy/board-gpr.c                |  19 +++-\n>  arch/mips/ath79/mach-pb44.c                  |  16 +++-\n>  drivers/i2c/busses/i2c-gpio.c                | 134 +++++++++++++--------------\n>  drivers/mfd/sm501.c                          |  49 +++++-----\n\nAcked-by: Lee Jones <lee.jones@linaro.org>","headers":{"Return-Path":"<linux-i2c-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"IMOK+hQJ\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6Xsg2Kf2z9t2Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  4 Oct 2017 21:57:11 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751440AbdJDK5J (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 4 Oct 2017 06:57:09 -0400","from mail-wm0-f52.google.com ([74.125.82.52]:45686 \"EHLO\n\tmail-wm0-f52.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751433AbdJDK5H (ORCPT\n\t<rfc822;linux-i2c@vger.kernel.org>); Wed, 4 Oct 2017 06:57:07 -0400","by mail-wm0-f52.google.com with SMTP id q124so22054371wmb.0\n\tfor <linux-i2c@vger.kernel.org>; Wed, 04 Oct 2017 03:57:06 -0700 (PDT)","from dell ([2.27.167.120]) by smtp.gmail.com with ESMTPSA id\n\th33sm13528445edh.70.2017.10.04.03.57.04\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 04 Oct 2017 03:57:05 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=g/+1E/FvCLLpqRNlBJJtsv9jHbbXVzj0tq0l82riPAI=;\n\tb=IMOK+hQJpd7T01oxR8jmVwL2i2Q7aAE4o6bOj/bOJsvxkoojcj6TcXznMbMmqSF65c\n\tiCreH+7exoi0V5lc0GTFa0x3C7Gh3VR9CMPbaOO7mERnHGtocFeXZZxe340VDGOWV4N5\n\tbP3fch/f3tCfqgmrsnvkRR4297C7ecvS/4NqQ=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=g/+1E/FvCLLpqRNlBJJtsv9jHbbXVzj0tq0l82riPAI=;\n\tb=SZ9YxZncbpUCh1AZskFtvkgM/btXouxs/LRJvSzsA9Wl8CFOq86o8H95LGofAvX7h7\n\tuS04ZxWOj/vlZX6YjqzI4a3T5FBl+XgwVchAlzzqbp7EUBlh8RHO+2e6IgHkflVvexIG\n\t1pKSm9NECRdy4Dh2PnsLtimcqdjDgpf+5k8YbukOVxCR+9J1A3j8SDYe/6FztTwc+T5i\n\tiFzjsHZ/wtSBQMCpHRosq5eV9BUkHepHbdt+wEUhzMPeZ6J5m+gB5zbaW9zeGDXkGqZz\n\t9fI2pllaHQQOMIz2b4uguJ/DyoIInuwBj7xzyVCcm/cjU0YNx3mUYcChTx7uwHdrmHC0\n\tl6hA==","X-Gm-Message-State":"AHPjjUhus13gYl+2XesmOjADiTT96gOgQG9oZkPqpztmmTdVKW9QyuLM\n\tXBwlESlLg+W5Yz6D+4kg4pPNcw==","X-Google-Smtp-Source":"AOwi7QAXmf4V5xxqGsEyyv14J9FEIqG9vZruV1b3Am2sycy/02/yTVIx6yk1xd/lTdpZEhMmPxPIbg==","X-Received":"by 10.80.212.40 with SMTP id t40mr28803272edh.67.1507114625862; \n\tWed, 04 Oct 2017 03:57:05 -0700 (PDT)","Date":"Wed, 4 Oct 2017 11:57:03 +0100","From":"Lee Jones <lee.jones@linaro.org>","To":"Linus Walleij <linus.walleij@linaro.org>","Cc":"Wolfram Sang <wsa@the-dreams.de>, linux-i2c@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, \n\tadi-buildroot-devel@lists.sourceforge.net, Geert Uytterhoeven\n\t<geert@linux-m68k.org>,         Steven Miao <realmz6@gmail.com>,\n\tRalf Baechle <ralf@linux-mips.org>, \n\tGuenter Roeck <linux@roeck-us.net>, Ville =?iso-8859-1?q?Syrj=E4l=E4?=\n\t<ville.syrjala@linux.intel.com>, Magnus Damm <magnus.damm@gmail.com>, \n\tBen Dooks <ben.dooks@codethink.co.uk>, Heiko Schocher <hs@denx.de>","Subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","Message-ID":"<20171004105703.qmahtqieimw4kn3p@dell>","References":"<20170917093906.16325-1-linus.walleij@linaro.org>\n\t<20170917093906.16325-2-linus.walleij@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20170917093906.16325-2-linus.walleij@linaro.org>","User-Agent":"NeoMutt/20170113 (1.7.2)","Sender":"linux-i2c-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-i2c.vger.kernel.org>","X-Mailing-List":"linux-i2c@vger.kernel.org"}},{"id":1782887,"web_url":"http://patchwork.ozlabs.org/comment/1782887/","msgid":"<20171009142403.GA17971@linux-mips.org>","list_archive_url":null,"date":"2017-10-09T14:24:03","subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","submitter":{"id":297,"url":"http://patchwork.ozlabs.org/api/people/297/","name":"Ralf Baechle","email":"ralf@linux-mips.org"},"content":"On Sun, Sep 17, 2017 at 11:39:00AM +0200, Linus Walleij wrote:\n\n> This converts the GPIO-based I2C-driver to using GPIO\n> descriptors instead of the old global numberspace-based\n> GPIO interface. We:\n> \n> - Convert the driver to unconditionally grab two GPIOs\n>   from the device by index 0 (SDA) and 1 (SCL) which\n>   will work fine with device tree and descriptor tables.\n>   The existing device trees will continue to work just\n>   like before, but without any roundtrip through the\n>   global numberspace.\n> \n> - Brutally convert all boardfiles still passing global\n>   GPIOs by registering descriptor tables associated with\n>   the devices instead so this driver does not need to keep\n>   supporting passing any GPIO numbers as platform data.\n> \n> There is no stepwise approach as elegant as this, I\n> strongly prefer this big hammer over any antsteps for this\n> conversion. This way the old GPIO numbers go away and\n> NEVER COME BACK.\n> \n> Special conversion for the different boards utilizing\n> I2C-GPIO:\n> \n> - EP93xx (arch/arm/mach-ep93xx): pretty straight forward as\n>   all boards were using the same two GPIO lines, just define\n>   these two in a lookup table for \"i2c-gpio\" and register\n>   these along with the device. None of them define any\n>   other platform data so just pass NULL as platform data.\n>   This platform selects GPIOLIB so all should be smooth.\n>   The pins appear on a gpiochip for bank \"G\" as pins 1 (SDA)\n>   and 0 (SCL).\n> \n> - IXP4 (arch/arm/mach-ixp4): descriptor tables have to\n>   be registered for each board separately. They all use\n>   \"IXP4XX_GPIO_CHIP\" so it is pretty straight forward.\n>   Most board define no other platform data than SCL/SDA\n>   so they can drop the #include of <linux/i2c-gpio.h> and\n>   assign NULL to platform data.\n> \n>   The \"goramo_mlr\" (Goramo Multilink Router) board is a bit\n>   worrisome: it implements its own I2C bit-banging in the\n>   board file, and optionally registers an I2C serial port,\n>   but claims the same GPIO lines for itself in the board file.\n>   This is not going to work: there will be competition for the\n>   GPIO lines, so delete the optional extra I2C bus instead, no\n>   I2C devices are registered on it anyway, there are just hints\n>   that it may contain an EEPROM that may be accessed from\n>   userspace. This needs to be fixed up properly by the serial\n>   clock using I2C emulation so drop a note in the code.\n> \n> - KS8695 board acs5k (arch/arm/mach-ks8695/board-acs5.c)\n>   has some platform data in addition to the pins so it needs to\n>   be kept around sans GPIO lines. Its GPIO chip is named\n>   \"KS8695\" and the arch selects GPIOLIB.\n> \n> - PXA boards (arch/arm/mach-pxa/*) use some of the platform\n>   data so it needs to be preserved here. The viper board even\n>   registers two GPIO I2Cs. The gpiochip is named \"gpio-pxa\" and\n>   the arch selects GPIOLIB.\n> \n> - SA1100 Simpad (arch/arm/mach-sa1100/simpad.c) defines a GPIO\n>   I2C bus, and the arch selects GPIOLIB.\n> \n> - Blackfin boards (arch/blackfin/bf533 etc) for these I assume\n>   their I2C GPIOs refer to the local gpiochip defined in\n>   arch/blackfin/kernel/bfin_gpio.c names \"BFIN-GPIO\".\n>   The arch selects GPIOLIB. The boards get spiked with\n>   IF_ENABLED(I2C_GPIO) but that is a side effect of it\n>   being like that already (I would just have Kconfig select\n>   I2C_GPIO and get rid of them all.) I also delete any\n>   platform data set to 0 as it will get that value anyway\n>   from static declartions of platform data.\n> \n> - The MIPS selects GPIOLIB and the Alchemy machine is using\n>   two local GPIO chips, one of them has a GPIO I2C. We need\n>   to adjust the local offset from the global number space here.\n>   The ATH79 has a proper GPIO driver in drivers/gpio/gpio-ath79.c\n>   and AFAICT the chip is named \"ath79-gpio\" and the PB44\n>   PCF857x expander spawns from this on GPIO 1 and 0. The latter\n>   board only use the platform data to specify pins so it can be\n>   cut altogether after this.\n> \n> - The MFD Silicon Motion SM501 is a special case. It dynamically\n>   spawns an I2C bus off the MFD using sm501_create_subdev().\n>   We use an approach to dynamically create a machine descriptor\n>   table and attach this to the \"SM501-LOW\" or \"SM501-HIGH\"\n>   gpiochip. We use chip-local offsets to grab the right lines.\n>   We can get rid of two local static inline helpers as part\n>   of this refactoring.\n> \n> Cc: Steven Miao <realmz6@gmail.com>\n> Cc: Ralf Baechle <ralf@linux-mips.org>\n> Cc: Lee Jones <lee.jones@linaro.org>\n> Cc: Guenter Roeck <linux@roeck-us.net>\n> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>\n> Cc: Magnus Damm <magnus.damm@gmail.com>\n> Cc: Ben Dooks <ben.dooks@codethink.co.uk>\n> Cc: Heiko Schocher <hs@denx.de>\n> Acked-by: Olof Johansson <olof@lixom.net>\n> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>\n> ---\n> ChangeLog v1->v2:\n> - Fix a minor typo in error path (scl was sda from copy-paste)\n> - Collected Olof's ACK\n> \n> Steven (Blackfin): requesting ACK for Wolfram to take this patch.\n> Ralf (MIPS): requesting ACK for Wolfram to take this patch.\n> Lee: requesting ACK for Wolfram to take this patch.\n> SM501 users: requesting Tested-by on this patch.\n> ---\n>  arch/arm/mach-ep93xx/core.c                  |  39 ++++----\n>  arch/arm/mach-ep93xx/edb93xx.c               |  15 +--\n>  arch/arm/mach-ep93xx/include/mach/platform.h |   4 +-\n>  arch/arm/mach-ep93xx/simone.c                |  12 +--\n>  arch/arm/mach-ep93xx/snappercl15.c           |  12 +--\n>  arch/arm/mach-ep93xx/vision_ep9307.c         |   7 +-\n>  arch/arm/mach-ixp4xx/avila-setup.c           |  17 +++-\n>  arch/arm/mach-ixp4xx/dsmg600-setup.c         |  16 +++-\n>  arch/arm/mach-ixp4xx/fsg-setup.c             |  16 +++-\n>  arch/arm/mach-ixp4xx/goramo_mlr.c            |  24 ++---\n>  arch/arm/mach-ixp4xx/ixdp425-setup.c         |  16 +++-\n>  arch/arm/mach-ixp4xx/nas100d-setup.c         |  16 +++-\n>  arch/arm/mach-ixp4xx/nslu2-setup.c           |  16 +++-\n>  arch/arm/mach-ks8695/board-acs5k.c           |  13 ++-\n>  arch/arm/mach-pxa/palmz72.c                  |  12 ++-\n>  arch/arm/mach-pxa/viper.c                    |  27 +++++-\n>  arch/arm/mach-sa1100/simpad.c                |  12 ++-\n>  arch/blackfin/mach-bf533/boards/blackstamp.c |  19 +++-\n>  arch/blackfin/mach-bf533/boards/ezkit.c      |  18 +++-\n>  arch/blackfin/mach-bf533/boards/stamp.c      |  18 +++-\n>  arch/blackfin/mach-bf561/boards/ezkit.c      |  18 +++-\n>  arch/mips/alchemy/board-gpr.c                |  19 +++-\n>  arch/mips/ath79/mach-pb44.c                  |  16 +++-\n\nFor MIPS:\n\nAcked-by: Ralf Baechle <ralf@linux-mips.org>\n\n  Ralf","headers":{"Return-Path":"<linux-i2c-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y9jDd6n75z9t6N\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 10 Oct 2017 01:24:33 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754232AbdJIOYa (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tMon, 9 Oct 2017 10:24:30 -0400","from eddie.linux-mips.org ([148.251.95.138]:51288 \"EHLO\n\tcvs.linux-mips.org\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1754411AbdJIOY1 (ORCPT\n\t<rfc822;linux-i2c@vger.kernel.org>); Mon, 9 Oct 2017 10:24:27 -0400","from localhost.localdomain ([127.0.0.1]:59356 \"EHLO linux-mips.org\"\n\trhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP\n\tid S23992800AbdJIOYZYL09s (ORCPT <rfc822; linux-i2c@vger.kernel.org>);\n\tMon, 9 Oct 2017 16:24:25 +0200","from h7.dl5rb.org.uk (localhost [127.0.0.1])\n\tby h7.dl5rb.org.uk (8.15.2/8.14.8) with ESMTP id v99EOD85018101;\n\tMon, 9 Oct 2017 16:24:13 +0200","(from ralf@localhost)\n\tby h7.dl5rb.org.uk (8.15.2/8.15.2/Submit) id v99EO3c9018084;\n\tMon, 9 Oct 2017 16:24:03 +0200"],"Date":"Mon, 9 Oct 2017 16:24:03 +0200","From":"Ralf Baechle <ralf@linux-mips.org>","To":"Linus Walleij <linus.walleij@linaro.org>","Cc":"Wolfram Sang <wsa@the-dreams.de>, linux-i2c@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, \n\tadi-buildroot-devel@lists.sourceforge.net, Geert Uytterhoeven\n\t<geert@linux-m68k.org>,         Steven Miao <realmz6@gmail.com>,\n\tLee Jones <lee.jones@linaro.org>, Guenter Roeck <linux@roeck-us.net>,\n\tVille =?iso-8859-1?q?Syrj=E4l=E4?=\n\t<ville.syrjala@linux.intel.com>, Magnus Damm <magnus.damm@gmail.com>, \n\tBen Dooks <ben.dooks@codethink.co.uk>, Heiko Schocher <hs@denx.de>","Subject":"Re: [PATCH 1/7] i2c: gpio: Convert to use descriptors","Message-ID":"<20171009142403.GA17971@linux-mips.org>","References":"<20170917093906.16325-1-linus.walleij@linaro.org>\n\t<20170917093906.16325-2-linus.walleij@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20170917093906.16325-2-linus.walleij@linaro.org>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"linux-i2c-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-i2c.vger.kernel.org>","X-Mailing-List":"linux-i2c@vger.kernel.org"}}]