From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751442AbdJ1QyO (ORCPT ); Sat, 28 Oct 2017 12:54:14 -0400 Received: from mail-yw0-f175.google.com ([209.85.161.175]:54191 "EHLO mail-yw0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbdJ1QyL (ORCPT ); Sat, 28 Oct 2017 12:54:11 -0400 X-Google-Smtp-Source: ABhQp+QD8G1H3wH1zhsHgT5aLu4hQAB9OpcEFdPVDLV0cisk5nG34BDQ6/hSzOF2IRypUukq74UOEQ== Subject: Re: [PATCH v2 1/7] gpio: brcmstb: Do not use gc->pin2mask() To: Doug Berger , Gregory Fong Cc: Linus Walleij , Florian Fainelli , Brian Norris , bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20171024195451.30535-1-opendmb@gmail.com> <20171024195451.30535-2-opendmb@gmail.com> From: Florian Fainelli Message-ID: <914591ef-f6b6-8e9b-a3cc-b7ac82391fd6@gmail.com> Date: Sat, 28 Oct 2017 09:54:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171024195451.30535-2-opendmb@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/2017 12:54 PM, Doug Berger wrote: > From: Linus Walleij > > The pin2mask() accessor only shuffles BIT ORDER in big endian systems, > i.e. the bitstuffing is swizzled big endian so "bit 0" is bit 7 or > bit 15 or bit 31 or so. > > The brcmstb only uses big endian BYTE ORDER which will be taken car of > by the ->write_reg() callback. > > Just use BIT(offset) to assign the bit. > > Cc: Gregory Fong > Cc: Florian Fainelli > Signed-off-by: Linus Walleij Reviewed-by: Florian Fainelli -- Florian