From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751350AbcEJQo1 (ORCPT ); Tue, 10 May 2016 12:44:27 -0400 Received: from vern.gendns.com ([206.190.152.46]:49616 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041AbcEJQoZ (ORCPT ); Tue, 10 May 2016 12:44:25 -0400 Subject: Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration. To: Sergei Shtylyov , nsekhar@ti.com, khilman@kernel.org References: <1462837612-7803-1-git-send-email-david@lechnology.com> <1462837612-7803-3-git-send-email-david@lechnology.com> <7e0373cf-2ae9-e205-2226-0ded6894b709@cogentembedded.com> Cc: petr@barix.com, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Kishon Vijay Abraham I , Greg Kroah-Hartman , Alan Stern , Bin Liu , Lee Jones , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org From: David Lechner Message-ID: <57320FE6.60003@lechnology.com> Date: Tue, 10 May 2016 11:44:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <7e0373cf-2ae9-e205-2226-0ded6894b709@cogentembedded.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/10/2016 06:26 AM, Sergei Shtylyov wrote: > On 5/10/2016 2:46 AM, David Lechner wrote: > >> The CFGCHIP registers are used by a number of devices, so using a syscon >> device to share them. The first consumer of this will by the >> phy-da8xx-usb >> driver. >> >> Signed-off-by: David Lechner > [...] >> diff --git a/arch/arm/mach-davinci/devices-da8xx.c >> b/arch/arm/mach-davinci/devices-da8xx.c >> index 725e693..69d11a1 100644 >> --- a/arch/arm/mach-davinci/devices-da8xx.c >> +++ b/arch/arm/mach-davinci/devices-da8xx.c >> @@ -11,6 +11,7 @@ >> * (at your option) any later version. >> */ >> #include >> +#include >> #include >> #include >> #include >> @@ -1109,3 +1110,30 @@ int __init da850_register_sata(unsigned long >> refclkpn) >> return platform_device_register(&da850_sata_device); >> } >> #endif >> + >> +static struct syscon_platform_data da8xx_cfgchip_platform_data = { >> + .label = "cfgchip", >> +}; >> + >> +static struct resource da8xx_cfgchip_resources[] = { >> + { >> + .start = DA8XX_SYSCFG0_BASE + DA8XX_CFGCHIP0_REG, >> + .end = DA8XX_SYSCFG0_BASE + DA8XX_CFGCHIP4_REG + 3, >> + .flags = IORESOURCE_MEM, >> + }, >> +}; >> + >> +static struct platform_device da8xx_cfgchip_device = { >> + .name = "syscon", >> + .id = 0, > > Again, -1. > > [...] > > MBR, Sergei > I wish you would have noticed this when I first submitted it. I remember going back and forth about this. But it has been too long and I can't remember the reason why I chose to go this way. It seems like changing it broke something with either this one or the phy device and I opted to keep it this way on both to be consistent. For example, the USB devices both use id = 0 as well even though there are only one of each type.