Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752143AbcDZOoJ (ORCPT ); Tue, 26 Apr 2016 10:44:09 -0400 Received: from mail-am1on0131.outbound.protection.outlook.com ([157.56.112.131]:36386 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751507AbcDZOoG (ORCPT ); Tue, 26 Apr 2016 10:44:06 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=gomspace.com; Subject: Re: [PATCH 1/3] mfd: add Cypress FM33256B Processor Companion driver To: Rob Herring References: <1461150471-23163-1-git-send-email-jlp@gomspace.com> <1461150471-23163-2-git-send-email-jlp@gomspace.com> <20160422193232.GA9737@rob-hp-laptop> CC: , , , , , , , , , , , From: Jeppe Ledet-Pedersen Message-ID: <571F7E60.9040106@gomspace.com> Date: Tue, 26 Apr 2016 16:42:40 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160422193232.GA9737@rob-hp-laptop> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [77.243.61.136] X-ClientProxiedBy: VI1PR06CA0020.eurprd06.prod.outlook.com (2a01:111:e400:587c::30) To DB3PR04MB0635.eurprd04.prod.outlook.com (2a01:111:e400:9431::21) X-MS-Office365-Filtering-Correlation-Id: 6397cf5f-c836-4eb3-1e7d-08d36de13525 X-Microsoft-Exchange-Diagnostics: 1;DB3PR04MB0635;2:GpyH0Zv6MrrxMYwvlRKXUdmyojo+VoBIPrER/bOL8gE6LfAwasZrNCqLrvufNXLULhcq8ukKMbjNzqLhlYDw3x+9SR/mIfe1QG3vaKPTArG6K+kH8fyMK2SqoFkd1eIvrGGFys10u8kG6+TmTKeMoKjUj6P7mhBoebjL7VSQu8kkJBvjgz9EJz1LMat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aXMPzKk+7LWlmNFVbfnPqQyHcUazQsbrkzg5t/UzsQWlUYuUBF7GhO3DgIRbelJ5veRlny2a5U0KqGD9ONDGfeSghMXNWLn4IwaUpuiRAnME/11p1Ncr48rCl4YxLXiF29vBe05sWn1/5wbwQKNE8UiA++j0pqKqe75RQieFgE2PqzwJ3Sg3g/HjDCH5c7WBc6FJl9dKvkyrldtDPmuTXSHxk+zx1LDUta8KQek7NjaCQk+GHOPQ1VoJt2e4EkG2xuW7Kaq1vxsQcJLkhgYDa/2cDY0tazvF74iH2AGDyIWvOwd/fPDqNVVVib411AJFnx8yHPk/jFzFs95gzierXzSEbSubNJBIXYt2i5zkCQ9d2fzuYdEplsEXnfhIJ/jID9Eps12ifvO+bjlYQSjLB1X+TQyLUmtHBtA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521072)(6040130)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041072)(6043046);SRVR:DB3PR04MB0635;BCL:0;PCL:0;RULEID:;SRVR:DB3PR04MB0635; X-Forefront-PRVS: 0924C6A0D5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(24454002)(76176999)(54356999)(87266999)(33656002)(36756003)(92566002)(65816999)(2906002)(50986999)(3846002)(19580405001)(110136002)(230700001)(4326007)(4001350100001)(6116002)(2950100001)(5004730100002)(586003)(80316001)(189998001)(5008740100001)(42186005)(66066001)(47776003)(59896002)(65956001)(81166005)(86362001)(50466002)(83506001)(1096002)(23746002)(64126003);DIR:OUT;SFP:1102;SCL:1;SRVR:DB3PR04MB0635;H:Jeppes-MacBook-Pro.local;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DB3PR04MB0635;23:1ENZf51PZhoz82wfGKgyWOgAmRLgxWmIFiC0V?= =?Windows-1252?Q?O+Qg7OQZ6s/5Km6l6c3i5mmpJqah0sZWZ3CqzlufQ5FFZ7CICs0Y8DY+?= =?Windows-1252?Q?3Ca2W/bERfzRT3XjDyoHSXuDig6fUdA20n+U+FrhdP5o/cp8LKnNwREz?= =?Windows-1252?Q?w358ZYEoFvmso4D1RRRoJNlm4nA8Qu3VRYgq3uT/vQ35i9RDVA1GQQt/?= =?Windows-1252?Q?ntjWWEUNu7VNtfwPbxQ1ymf5HsDJLQkSlpsRXKZ95NpVRQ62T7KJtmmH?= =?Windows-1252?Q?GVGoTcWS7nT11WjLgwQNfz6ZB0x5IjZO08f542jr4O86KSiX5yHW6HL2?= =?Windows-1252?Q?zEvl4BWthWZJ1ypLNeH+TBUSWXYZxnYeb8TgNbYVcjuHxf2etOIUHnFI?= =?Windows-1252?Q?BIAo3M6rNY7p7JkMaPgDU9f8jg9RXmVwTIpzytDTUdm1K0oEtEdSkaIs?= =?Windows-1252?Q?0v7CfvG7tSVSX6ktBh94Oyfj6T5Cl4tTfQBieWQwvYSr63TizytO3F6j?= =?Windows-1252?Q?3rnTbLyTObtD1LjDC05BwCT23Vh4t3bSx+eW2kykc6aXQqeiN+efO5d2?= =?Windows-1252?Q?6uTuSJmfhTyWLG5fa+v7tIEbOFtC7bAIZxvq3mavt5nYeCW8iXDCBoue?= =?Windows-1252?Q?sFSOUnsYp11siyRCZalIsdPl7Ikyz0MulfFeZvA2Crjm12yzOCALjI5A?= =?Windows-1252?Q?taPHFvqSZupMiZhoNvUERiePlsBFQHf9cXJGVLG+dOYCiSmoifFgjpRG?= =?Windows-1252?Q?WU2K714nF/+mJZw6QyKE0cXqg5KwRtjYemc33fUlg3GFuCKCQYUiozY8?= =?Windows-1252?Q?B81FH+avgvwbawD6aUC5tC17PbwTNR3qoZ2wiIRF8YPDRMxEFoWHN9Q4?= =?Windows-1252?Q?3A7tEF7jzOiCuWE11ICpIFCNtqVCCC4P4ghPzzeoEqIh572pRHRnOXms?= =?Windows-1252?Q?ZC7O5N/X6JRtue+tW50aISp2Rd4USBS2Omm1YTGiCNt+2xca94MrSDW3?= =?Windows-1252?Q?Co5VBsxcVMGSo5pQPezX45ZJD0Cx0rRk0xA8F5lhLEBhv0UtWR5lM5CM?= =?Windows-1252?Q?SrcHt5G7ZMXC/g=3D?= X-Microsoft-Exchange-Diagnostics: 1;DB3PR04MB0635;5:KHTxY0TfAuClA/II0P7QRZHuYVjq3Sj204YnTunjvigZd4b7qqNxrugeH6ZtDx4uTifzBmNdWJ7DhFO9DTPZnZ1YGhG7o1wwcffuqIAQrqa2vxbuom/hCaZiilIqbGbRhbWNihEF+EJ8VV+KeLPq1g==;24:bMeNw+uDrX3eTP79DOm/7dQmHoQAGDxW8fx28KWIxbf4FkjK05qyeNzGbSw9K6wJAshNuY2NOc9gyvS053Ebx96iA0BlQBxQsFv7Ig+j9G8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: gomspace.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2016 14:44:00.5128 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR04MB0635 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 817 Lines: 35 On 22/04/16 21:32, Rob Herring wrote: > On Wed, Apr 20, 2016 at 01:07:49PM +0200, Jeppe Ledet-Pedersen wrote: [snip] >> + >> +The MFD exposes two subdevices: >> +- The FRAM: "cypress,fm33256b-fram" >> +- The RTC: "cypress,fm33256b-rtc" >> + >> +Example: >> + >> +spi1: spi@f800800 { >> + status = "okay"; >> + cs-gpios = <&pioC 25 0>; >> + >> + fm33256b@0 { >> + compatible = "cypress,fm33256b"; >> + spi-max-frequency = <10000000>; >> + cypress,charge-enabled; >> + cypress,charge-fast; >> + reg = <0>; >> + }; > > Where's the 2nd sub device? Hi Rob, Right now I just add the two sub-devices using mfd_add_devices in the fm33256b_probe function in my MFD driver. Would it be better to check for compatible child nodes before adding each sub-device, like it's done in drivers/mfd/tc3589x.c? Thanks, -Jeppe