From patchwork Thu Feb 20 14:51:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 212790 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A090C11D05 for ; Thu, 20 Feb 2020 14:51:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13764208E4 for ; Thu, 20 Feb 2020 14:51:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="gwuR9dK7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728079AbgBTOvu (ORCPT ); Thu, 20 Feb 2020 09:51:50 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:44634 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728087AbgBTOvh (ORCPT ); Thu, 20 Feb 2020 09:51:37 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200220145136euoutp022fcbd9861befed7266dbf3973cab7fd5~1I_Guj8wo1100211002euoutp02O for ; Thu, 20 Feb 2020 14:51:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200220145136euoutp022fcbd9861befed7266dbf3973cab7fd5~1I_Guj8wo1100211002euoutp02O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1582210296; bh=YqMtfkiBvVHazwIHeJte8dn8ntnJBx4eD3U4pauHQgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gwuR9dK7TdjAucm5jXqEcHYLlB25aRBgFYlMIRKkpp3h0+jFSk8b1/M8f3R6OESWX k6pjGBTMBxvNxpx3PEIdhDwB/npPpVHzja+xWNoeo3toIwObly9cQKBvLwgpGAiWBW 4G5jOBp3Tchbk1YoLhdMJ8pWH67gAP7hORi3F9NY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200220145136eucas1p2157af29c7f8ac975cec9c637e6f09227~1I_GfsEhs1366513665eucas1p2R; Thu, 20 Feb 2020 14:51:36 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 2B.E9.61286.7FC9E4E5; Thu, 20 Feb 2020 14:51:35 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200220145135eucas1p1ba181cef65c7a4f91a254ee35e022f08~1I_GHmd8a0784307843eucas1p1q; Thu, 20 Feb 2020 14:51:35 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200220145135eusmtrp1c6139c2fac24f47dfd1498dabfdcea47~1I_GHBU3K1377513775eusmtrp1i; Thu, 20 Feb 2020 14:51:35 +0000 (GMT) X-AuditID: cbfec7f2-f0bff7000001ef66-3b-5e4e9cf7113d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1A.C7.07950.7FC9E4E5; Thu, 20 Feb 2020 14:51:35 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200220145135eusmtip1533674ec21b81c7b6fc98ae954eb47e2~1I_FsqLqD1163211632eusmtip1h; Thu, 20 Feb 2020 14:51:35 +0000 (GMT) From: Marek Szyprowski To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Chanwoo Choi , MyungJoo Ham , Sebastian Reichel , Mark Brown Subject: [PATCH 3/3] power: charger: max14577: Add proper dt-compatible strings Date: Thu, 20 Feb 2020 15:51:27 +0100 Message-Id: <20200220145127.21273-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200220145127.21273-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNIsWRmVeSWpSXmKPExsWy7djPc7rf5/jFGazYZWWxccZ6VoupD5+w WVz/8pzV4vz5DewWl3fNYbP43HuE0WLtkbvsFrcbV7BZnN5d4sDpsWlVJ5tH35ZVjB6fN8kF MEdx2aSk5mSWpRbp2yVwZfyaN42tYDdnRV/fK7YGxn6OLkZODgkBE4kJW7vZQWwhgRWMEgs3 h3YxcgHZXxgltnS2s0A4nxklfj+eAFTFAdbx6Y4uRHw5o8TJD69Z4TqeTJ3KAjKKTcBQoutt FxuILSJgJXH6fwczSBGzwAomiY+/PzGBJIQFAiXerXsKZrMIqErM27mVFcTmFbCV+D9tGTvE ffISqzccYAaxOQXsJCZNmAA2SELgPZvE3vUr2SCKXCSWT/zFCGELS7w6vgWqWUbi9OQeFoiG ZkaJh+fWskM4PYwSl5tmQHVYS9w594sN5DlmAU2J9bv0IcKOEi0z1zNC/MwnceOtIEiYGcic tG06M0SYV6KjTQiiWk1i1vF1cGsPXrjEDGF7SCz6PIsREkITGSVerTrGPoFRfhbCsgWMjKsY xVNLi3PTU4sN81LL9YoTc4tL89L1kvNzNzECk8Tpf8c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J6998CzDZv0npkGevO+8N1edLU5P+HwryvWwu/3Wszc8HKihXtVY8ER nlqTSCWW4oxEQy3mouJEAIuZGm1vAgAA X-CMS-MailID: 20200220145135eucas1p1ba181cef65c7a4f91a254ee35e022f08 X-Msg-Generator: CA X-RootMTR: 20200220145135eucas1p1ba181cef65c7a4f91a254ee35e022f08 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200220145135eucas1p1ba181cef65c7a4f91a254ee35e022f08 References: <20200220145127.21273-1-m.szyprowski@samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add device tree compatible strings and create proper modalias structures to let this driver load automatically if compiled as module, because max14577 MFD driver creates MFD cells with such compatible strings. Signed-off-by: Marek Szyprowski --- drivers/power/supply/max14577_charger.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/power/supply/max14577_charger.c b/drivers/power/supply/max14577_charger.c index 8a59feac6468..891ba9f6f295 100644 --- a/drivers/power/supply/max14577_charger.c +++ b/drivers/power/supply/max14577_charger.c @@ -623,6 +623,15 @@ static const struct platform_device_id max14577_charger_id[] = { }; MODULE_DEVICE_TABLE(platform, max14577_charger_id); +static const struct of_device_id of_max14577_charger_dt_match[] = { + { .compatible = "maxim,max77836-charger", + .data = (void *)MAXIM_DEVICE_TYPE_MAX77836, }, + { .compatible = "maxim,max14577-charger", + .data = (void *)MAXIM_DEVICE_TYPE_MAX14577, }, + { }, +}; +MODULE_DEVICE_TABLE(of, of_max14577_charger_dt_match); + static struct platform_driver max14577_charger_driver = { .driver = { .name = "max14577-charger",