From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABAE4C47082 for ; Thu, 3 Jun 2021 14:04:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91FB5613EE for ; Thu, 3 Jun 2021 14:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231365AbhFCOF4 (ORCPT ); Thu, 3 Jun 2021 10:05:56 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:43260 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbhFCOF4 (ORCPT ); Thu, 3 Jun 2021 10:05:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=+F4TYRlKaPioKXq/PeE5dbOcDH3xCZTOmCks5Pjeaeg=; b=o1A+oRPk1Yoi2i1p2TF/mhhyl+ 5w9RjXPqbXxgDyv5484mlhlvNJcMAXhKdQ62NSzaiALuAMCrvp00ZyfXs4A1m3NO+o/iWZwJlVbJp mSqirkz8AKpsUrIDX/16Zw8lWeX7boE3PwLAHdU+qw2XGEOghKeUVqBvowXiJytPrp/M=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lonx1-007d6E-Tn; Thu, 03 Jun 2021 16:03:59 +0200 Date: Thu, 3 Jun 2021 16:03:59 +0200 From: Andrew Lunn To: Sander Vanheule Cc: Andy Shevchenko , Pavel Machek , Rob Herring , Lee Jones , Linus Walleij , Michael Walle , Linux LED Subsystem , devicetree , "open list:GPIO SUBSYSTEM" , Hans de Goede , Linux Kernel Mailing List Subject: Re: [PATCH v4 3/5] mfd: Add RTL8231 core device Message-ID: References: <56fb027587fa067a249237ecaf40828cd508cdcc.1622713678.git.sander@svanheule.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org > I wanted to make the masking explicit, but since regmap-mdio currently requires > a register address width of 5 bit, it could move there. > > Actually, can we safely assume that any MDIO driver implementing clause-22 > access (5-bit register address width) will just ignore higher bits? In that > case, I could just drop these functions and not even modify regmap-mdio. It > appears to work for bitbanged MDIO. How are C45 addresses handled? The API to the MDIO bus driver uses a register value which is 32 bits in width. Bit 30 indicates the address is a C45 address, and then you have 21 bits of actual address. regmap-mdio needs to be generic and support both C22 and C45. Andrew