Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp398254rwn; Thu, 8 Sep 2022 03:26:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR6bE9uXSZ0j3uyuYQVTJhjQik8pdrRn5xORSrosIA7EpJ4B6f9WoNfid/klKWSsjRU437+r X-Received: by 2002:a17:907:d0b:b0:741:7ca6:a2b with SMTP id gn11-20020a1709070d0b00b007417ca60a2bmr5755015ejc.654.1662632765963; Thu, 08 Sep 2022 03:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662632765; cv=none; d=google.com; s=arc-20160816; b=SxqsShVRFYpa8948xCkAUmh52pvKGX+/P8jsMq9gqTKc+b9k4bv7bma4T5lbZ4mcGv SixWdPPNP9/SfL9sULEf4aBiD7fI8LBYvrXyYYtstGvxFs8xhfyr5F/na2A2ZlmUvOUT 9CPkSIxuk4nd5Vth+h836DM5+eHZm2bA1QHefqWsBx8jOWx3Ouwkcr5VKs1n25x2eHjR kIOifVcIcoDfeWAjkp9NSxhNWQzzml3J84unGWk3o3TPoemNWoy7nS/btjGIWrl8TEXb DqUfdmHvqb2IBgbRE9MS3zPBfZE4exuq9UMHt469fE32LA2u/BhIluDhDiIAFsFF1zan Lv8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ql+ezVVpD0f72eDrl7iveBil24D45M08o6ttFIuYgLI=; b=rfLve7Mwv9ycCTnr0lxrhirj2eR7DLowvpwLHyf8OE7ZGJDaHn/3pWWhVjDFJskH0E JJSLuHdOHLeDoj3vDCwjI9r4Lzbs1RoFk5IysOmfDfePdvngsKz8/fwXi7B3VlDAXNCO 1mH85NMLLeOpBvtqChcCIVGAUvLz9++YRbPNbeysG3KxSpN0S0V2dj92moM/q9KjWWhg D585vTYNmuGg7ODq99C5sy0tXgOebZRHhfnf8c0/Lv8tCNgnYzaV3P27yZf0FQYeXJHW ifsxPu18+pfFKOEs9Ycqv1VYt7foXqGY630BOQMlcdL+gTwqQLqYuc3Pg/uB5mfA/2Bz G8Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hB6x9UYD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lf15-20020a170906ae4f00b0073d5b609447si1552829ejb.324.2022.09.08.03.25.37; Thu, 08 Sep 2022 03:26:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hB6x9UYD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231304AbiIHJon (ORCPT + 99 others); Thu, 8 Sep 2022 05:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231284AbiIHJoh (ORCPT ); Thu, 8 Sep 2022 05:44:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3DCC14008; Thu, 8 Sep 2022 02:44:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 04B1A61C30; Thu, 8 Sep 2022 09:44:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F410DC433D7; Thu, 8 Sep 2022 09:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662630274; bh=I3kuzLPKhDYkB44Kbq3Ba0qHby0mCUZxIRVbEQXEPyw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hB6x9UYDzP88wUBio5ktCkyq2xTk8jx/SoHt1nTnq9DkjLrlmtjZjNjDl1SRSfjZY cZhY80i34wCcNXFp/b/ApMeVRH3Qx0hOLkKKj0j9/1A4JtVylswYI55Zz8SLXWDyVK BBMrJU4nxKoCieqifcvTXQ0JwDHC/Y1IT+sFghMLAld6ZIboFioVe0vvjo/sgKSqoy MTXf75DznbzCkQKbNdZbKYxj2cJ+gzpfbSnjCBEJdfpFxKRuqsaKrjzvXnpx/rBb8C 9wxmaUe/9P1BwYFYVqeIJGXhQ9b53LtP+32BR9PWvzl0CLTRJFAa/C5ooAaVSFKgiA WbAn5uFHHEusw== Date: Thu, 8 Sep 2022 10:44:25 +0100 From: Lee Jones To: Colin Foster Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Terry Bowman , Vladimir Oltean , Greg Kroah-Hartman , Andy Shevchenko , Dan Williams , Jonathan Cameron , UNGLinuxDriver@microchip.com, Steen Hegelund , Lars Povlsen , Linus Walleij , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Russell King , Heiner Kallweit , Andrew Lunn , Krzysztof Kozlowski , Rob Herring , katie.morris@in-advantage.com Subject: Re: [RESEND PATCH v16 mfd 8/8] mfd: ocelot: add support for the vsc7512 chip via spi Message-ID: References: <20220905162132.2943088-1-colin.foster@in-advantage.com> <20220905162132.2943088-9-colin.foster@in-advantage.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220905162132.2943088-9-colin.foster@in-advantage.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 05 Sep 2022, Colin Foster wrote: > The VSC7512 is a networking chip that contains several peripherals. Many of > these peripherals are currently supported by the VSC7513 and VSC7514 chips, > but those run on an internal CPU. The VSC7512 lacks this CPU, and must be > controlled externally. > > Utilize the existing drivers by referencing the chip as an MFD. Add support > for the two MDIO buses, the internal phys, pinctrl, and serial GPIO. > > Signed-off-by: Colin Foster > Reviewed-by: Vladimir Oltean > --- > > v16 > * Includes fixups: > * ocelot-core.c add includes device.h, export.h, iopoll.h, ioport,h > * ocelot-spi.c add includes device.h, err.h, errno.h, export.h, > mod_devicetable.h, types.h > * Move kconfig.h from ocelot-spi.c to ocelot.h > * Remove unnecessary byteorder.h > * Utilize resource_size() function > > v15 > * Add missed include bits.h > * Clean _SIZE macros to make them all the same width (e.g. 0x004) > * Remove unnecessary ret = ...; return ret; calls > * Utilize spi_message_init_with_transfers() instead of > spi_message_add_tail() calls in the bus_read routine > * Utilize HZ_PER_MHZ from units.h instead of a magic number > * Remove unnecessary err < 0 checks > * Fix typos in comments > > v14 > * Add Reviewed tag > * Copyright ranges are now "2021-2022" > * 100-char width applied instead of 80 > * Remove invalid dev_err_probe return > * Remove "spi" and "dev" elements from ocelot_ddata struct. > Since "dev" is available throughout, determine "ddata" and "spi" from > there instead of keeping separate references. > * Add header guard in drivers/mfd/ocelot.h > * Document ocelot_ddata struct > > --- > MAINTAINERS | 1 + > drivers/mfd/Kconfig | 21 +++ > drivers/mfd/Makefile | 3 + > drivers/mfd/ocelot-core.c | 161 ++++++++++++++++++++ > drivers/mfd/ocelot-spi.c | 299 ++++++++++++++++++++++++++++++++++++++ > drivers/mfd/ocelot.h | 49 +++++++ > 6 files changed, 534 insertions(+) > create mode 100644 drivers/mfd/ocelot-core.c > create mode 100644 drivers/mfd/ocelot-spi.c > create mode 100644 drivers/mfd/ocelot.h Applied, thanks. -- Lee Jones [李琼斯]