From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759774AbdEVPod (ORCPT ); Mon, 22 May 2017 11:44:33 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:33985 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751405AbdEVPnh (ORCPT ); Mon, 22 May 2017 11:43:37 -0400 MIME-Version: 1.0 In-Reply-To: <7d5b0099-b4d9-881d-fc63-0c7f8229e096@siemens.com> References: <62280d24a7cf7c0be849c1186c909c850f4d2cc6.1495119548.git.jan.kiszka@siemens.com> <7d5b0099-b4d9-881d-fc63-0c7f8229e096@siemens.com> From: Linus Walleij Date: Mon, 22 May 2017 17:43:35 +0200 Message-ID: Subject: Re: [PATCH v2 1/6] gpio: exar: Fix passing in of parent PCI device To: Jan Kiszka , Greg Kroah-Hartman Cc: Andy Shevchenko , Linux Kernel Mailing List , "linux-serial@vger.kernel.org" , "linux-gpio@vger.kernel.org" , Sudip Mukherjee , Sascha Weisenberger Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 21, 2017 at 1:44 PM, Jan Kiszka wrote: > On 2017-05-18 19:14, Andy Shevchenko wrote: >> On Thu, May 18, 2017 at 5:59 PM, Jan Kiszka wrote: >>> This fixes reloading of the GPIO driver for the same platform device >>> instance as created by the exar UART driver: First of all, the driver >>> sets drvdata to its own value during probing and does not restore the >>> original value on exit. But this won't help anyway as the core clears >>> drvdata after the driver left. >>> >>> Use stable platform_data instead. >> >> Okay, basically what we are trying to do here is to reinvent part of >> MFD framework. >> >> I'd like to hear Linus' and others opinions if it worth to use it instead. > > I've looked into MFD modeling, but it would only make sense if we break > up the exar driver, change its xr17v35x part into a platform device and > create a dual-cell MFD for the PCI device. I don't think that would be > beneficial here. There are also dependencies between the UART part and > the MPIOs, specifically during init. All that would create a lot of > churn to the existing exar code. > > I'm now passing the parent reference via device.parent instead of using > platform data. Actually I am pretty much OK with either, there are gray areas in the device model and so it has to be sometimes. I'd just like Greg's ACK on this so I can merge the whole series through the GPIO tree. Incidentally, he is the device model maintainer so he might have some comments. Or be as tolerant as me. I don't know. Greg? Yours, Linus Walleij