From patchwork Wed Jul 4 03:37:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinath Mannam X-Patchwork-Id: 10505745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9CBAA600F5 for ; Wed, 4 Jul 2018 03:37:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8498A2888A for ; Wed, 4 Jul 2018 03:37:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78D9128899; Wed, 4 Jul 2018 03:37:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EACE28885 for ; Wed, 4 Jul 2018 03:37:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753228AbeGDDh1 (ORCPT ); Tue, 3 Jul 2018 23:37:27 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:38881 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753192AbeGDDh0 (ORCPT ); Tue, 3 Jul 2018 23:37:26 -0400 Received: by mail-oi0-f66.google.com with SMTP id v8-v6so8040227oie.5 for ; Tue, 03 Jul 2018 20:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=UzZmaGipAT4qB3UKnL65Gf05TtfyJBxBOBkqAU7A9xA=; b=LYFuPFkDLNlGjT6ar3wNGuy/Rl0XVRNbDCAe0cD5NGmekhMNbaRzGZ+DI5UAzZ2i4J Vg3ZK78aPQFVTTEEwAYrMLsg2SkgkfgbSV2a0yQX3komHVV9wfuz7zvlddt1sXSGW4Sa nkOVceAZwqswJjwo1cjHW0a33aSRWyBRoM8+g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=UzZmaGipAT4qB3UKnL65Gf05TtfyJBxBOBkqAU7A9xA=; b=U+JjcdodFfjm7rVp60SAMCQ89l3NCAHPayqZ4XnBc94aiR1WEKdrTeRdQWWzeTTusf hBJpwG61y0ivLxPbTgLnNdFQJJM04AmaFKF6GYbYmBlhEZ8Nyz461KAntikqbw8wHoS8 GIo1eftdIILSzJJgvSpiW8lnPwS2QZHVTTtjA0G0i+fof+Zwq8GJ87LLxWUYeDxAWobl U4Oc0L6BY4LPnwmR29mgkxRCpaMMYWD+MvWm8QmhzU/fZZU/kVMr+zVxLmFHGPSpDyGc wott98DtNReUYGJjD3pasHQ5vjFEAlZJa/dn8snqNMY/yU1WfFVWQNCf96El+8bkxNCE nP8Q== X-Gm-Message-State: APt69E1P0Y/BVtXc9NgaNBXJPgSU6QwaLSG3vIwP3wtTfgl/DNFUOJLE m+TyVqgf1wXXUA1uePf0fYJKBaCx4AJMybSN9AMKGQ== X-Google-Smtp-Source: AAOMgpfU/gDmk+uhOu2Zb+VlX0ER98nnlxH8dzXI3AKaPJjtFDoVmZLb/wh7UsX06dTo4oH0V8wty+e1OaqCLEfmG3w= X-Received: by 2002:aca:37c2:: with SMTP id e185-v6mr343870oia.326.1530675446277; Tue, 03 Jul 2018 20:37:26 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:51d2:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 20:37:25 -0700 (PDT) In-Reply-To: References: <1530609760-8919-1-git-send-email-srinath.mannam@broadcom.com> From: Srinath Mannam Date: Wed, 4 Jul 2018 09:07:25 +0530 Message-ID: Subject: Re: [RFC PATCH] ACPI: bus: match of_device_id using acpi device To: Andy Shevchenko , Sudeep Holla Cc: "Rafael J. Wysocki" , Len Brown , Ray Jui , Vladimir Olovyannikov , Vikram Prakash , Scott Branden , ACPI Devel Maling List , Linux Kernel Mailing List Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Sudeep, Andy, Yes, This patch is to get of_device_id and then fetch data pointer. To add ACPI support in multiple drivers which are device-tree based and has list of of_device_ids, by using this function very minimal changes and can avoid acpi_device_id list in the driver. I will send driver changes where this function used to add ACPI support in following patches. Below are the changes added to add ACPI support in sdhci iproc driver using this function. Regards, Srinath. On Tue, Jul 3, 2018 at 11:11 PM, Andy Shevchenko wrote: > On Tue, Jul 3, 2018 at 12:22 PM, Srinath Mannam > wrote: >> This patch provides a function, to get of_device_id after >> matching with ACPI device _DSD object compatible property >> in the case driver does not contain acpi_device_id list >> and driver probe called for ACPI device ID PRP0001 with >> compatible property match with of_device_id compatible. > > I don't see any usefulness of this function. Care to provide a real use case? > > -- > With Best Regards, > Andy Shevchenko --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index db40218..f1ecac97 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -15,6 +15,7 @@ * iProc SDHCI platform driver */ +#include #include #include #include @@ -267,8 +268,13 @@ static int sdhci_iproc_probe(struct platform_device *pdev) int ret; match = of_match_device(sdhci_iproc_of_match, &pdev->dev); - if (!match) - return -EINVAL; + if (!match) { + match = acpi_match_of_device_id(sdhci_iproc_of_match, + &pdev->dev); + if (!match) + return -EINVAL; + } + iproc_data = match->data; host = sdhci_pltfm_init(pdev, iproc_data->pdata, sizeof(*iproc_host));