From patchwork Sun Sep 16 23:45:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6F9E13AD for ; Sun, 16 Sep 2018 23:46:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D080E29340 for ; Sun, 16 Sep 2018 23:46:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C45122934F; Sun, 16 Sep 2018 23:46:11 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F62429340 for ; Sun, 16 Sep 2018 23:46:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 13C592677FF; Mon, 17 Sep 2018 01:46:06 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0F63726781A; Mon, 17 Sep 2018 01:46:03 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by alsa0.perex.cz (Postfix) with ESMTP id F3B262677FC for ; Mon, 17 Sep 2018 01:45:58 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id r196-v6so10087554iod.0 for ; Sun, 16 Sep 2018 16:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QcoflERtpbbMpFHGfNLZf+J44DqlCQNeE1IN/AfmCyw=; b=QZ5CW7Fo4X2d5dWSsyibw1FewzAcVLqIfsIhOn4Di1qz3uJz15hTqBNSl6D//5Ki9q Eaa02bx8tJ+CixARxakw8c9gpyXYVTtppksrkOPfobracWgN3WG1hQ9GI5FqP3FlMSxp Ny/RKE7IIEv1qOa3nF/AotMXlPtBYPZGF8GaI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QcoflERtpbbMpFHGfNLZf+J44DqlCQNeE1IN/AfmCyw=; b=uOiaFceXGOvJJiGfunPbKIqSCTu5vPfVy2MrdrwIbq57LxfHgij8adrOS5wPhvHfmO RHyM45v4kYoUQLxn5JpEpKJWEF/7GQmEnte9i9c+2p3d0wFA2Xp6uYerXPKQZrG3lAjS hK0AQtGHiyCxb4dovZCuMoDCYC571sNcCGmngAjjFU5hDHCuSLvYbjVMzreX76yvhtPL gQqWDAKcel+StjHrt+7aH2WjQfBLF73zzmXdiFep0VHBi1i3jMVBsc+DQlwgiObEvipx 5PLMcEhqXveHn2Ej0as1OM8k7HOqslEzFj1fNo7nFISa6w59sRy2OY6aD7QctC80ev2I F5NA== X-Gm-Message-State: APzg51Aw/TWDYLVfa//vQlI0CEQ2DLInqxn7f9eNrLN0xKIsfEFAuN/Q 9M53DfGEf2jsjL+VV1fZV2skdA== X-Google-Smtp-Source: ANB0VdZfaqPCa+jueB1u3F+i/YV6WKBSxekAl0eW6kTflKSfH9ugH2prhJyZ2i5B3D3T2T/EZe/Hjg== X-Received: by 2002:a6b:25d2:: with SMTP id l201-v6mr18710058iol.115.1537141558285; Sun, 16 Sep 2018 16:45:58 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.45.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:45:57 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:40 -0700 Message-Id: <20180916234546.29661-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 1/7] slimbus: core: add support to uevent X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla This patch adds support to uevent to help automatic module loading. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 95b00d2..31f2910 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include "slimbus.h" @@ -57,11 +58,24 @@ static int slim_device_remove(struct device *dev) return 0; } +static int slim_device_uevent(struct device *dev, struct kobj_uevent_env *env) +{ + struct slim_device *sbdev = to_slim_device(dev); + int ret; + + ret = of_device_uevent_modalias(dev, env); + if (ret != -ENODEV) + return ret; + + return add_uevent_var(env, "MODALIAS=slim:%s", dev_name(&sbdev->dev)); +} + struct bus_type slimbus_bus = { .name = "slimbus", .match = slim_device_match, .probe = slim_device_probe, .remove = slim_device_remove, + .uevent = slim_device_uevent, }; EXPORT_SYMBOL_GPL(slimbus_bus); From patchwork Sun Sep 16 23:45:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4FE8513AD for ; Sun, 16 Sep 2018 23:46:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EC0A29340 for ; Sun, 16 Sep 2018 23:46:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32E592934C; Sun, 16 Sep 2018 23:46:37 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 917A129340 for ; Sun, 16 Sep 2018 23:46:36 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DF07C267893; Mon, 17 Sep 2018 01:46:10 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 219FA2676AA; Mon, 17 Sep 2018 01:46:03 +0200 (CEST) Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by alsa0.perex.cz (Postfix) with ESMTP id 02BF52677FF for ; Mon, 17 Sep 2018 01:46:00 +0200 (CEST) Received: by mail-it0-f65.google.com with SMTP id h1-v6so8782429itj.4 for ; Sun, 16 Sep 2018 16:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PIKaH/Ayz19S8iNTPDQor8FxL6MltyIuIX2u6+vfhek=; b=ee7g1aiNVMrlWJbii8louGa7accboQgy+AOfEg9XLtOZpHOJBDpBDYMeFIJoikkMs6 s8EyyClPK2N6P8A4yOToExebsnio4GPoC7GlrgJpUUShXH+KgqouuDSHHGs9VzOTYHIn NbtlhdZOVETN+bKhQ6HZ3gGkdpNIyHjFH85qc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PIKaH/Ayz19S8iNTPDQor8FxL6MltyIuIX2u6+vfhek=; b=tMC/WKzVpGIZM7npfYwqp/vc9nYnBaXr349ITT+whSgw/7CF98vkmIWhIE9bPsRNNl jcA6gTDZ0c86tJ/zgdkOt86lAooZfZBCJu9/13sEzyj1M6M6Qcdfd8CyAp6bx97W/6Nf OWv8aoWRgGwopGfh+DMbfc5f7RNocl28To7ZF71gjJmOooWNHjblgolF2tSxDiHcD2cX 1V2J9LPPSGixNIyqesYZ72vnxyH5TmphBDWm2mU9fsCSQNBBuBO3VimFNBQ5m/26M/Ke wKdltBUJ+uQIAHXxhcZz4+Qdoj7qyfoW6dMLYsvb0y20IPFZRvS4rPkg2dgrEgfYhH5f yDGg== X-Gm-Message-State: APzg51AN/xiYUcHj10YBPUZFdkciFce0YQgfpmL8s1wVgbO88DtfMzso E3vKyooYU8t4pED+dmQce4JhmQ== X-Google-Smtp-Source: ANB0VdY7W8TNXy3QBSFCzO+Q+M/Frdz77xjS4yobxID+qnXWZiliFhGwlWnA2oBQ/UH0Ig5gbjSV8g== X-Received: by 2002:a24:24c2:: with SMTP id f185-v6mr10666065ita.18.1537141559357; Sun, 16 Sep 2018 16:45:59 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.45.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:45:58 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:41 -0700 Message-Id: <20180916234546.29661-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 2/7] slimbus: core: update device status in probe X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla device status update can be racy with probe in some cases, so make sure it take lock during the probe. Also after probe the device is expected to be ready for communications, so make sure that a logical address can be assigned to it after probe. If it fails to do so then probe defer such instances. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/core.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 31f2910..262591f 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -40,8 +40,23 @@ static int slim_device_probe(struct device *dev) { struct slim_device *sbdev = to_slim_device(dev); struct slim_driver *sbdrv = to_slim_driver(dev->driver); + int ret; + + ret = sbdrv->probe(sbdev); + if (ret) + return ret; - return sbdrv->probe(sbdev); + /* try getting the logical address after probe */ + ret = slim_get_logical_addr(sbdev); + if (!ret) { + if (sbdrv->device_status) + sbdrv->device_status(sbdev, sbdev->status); + } else { + dev_err(&sbdev->dev, "Failed to get logical address\n"); + ret = -EPROBE_DEFER; + } + + return ret; } static int slim_device_remove(struct device *dev) From patchwork Sun Sep 16 23:45:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE8D915A6 for ; Sun, 16 Sep 2018 23:46:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDAD929340 for ; Sun, 16 Sep 2018 23:46:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B18232934C; Sun, 16 Sep 2018 23:46: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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0181B29340 for ; Sun, 16 Sep 2018 23:46:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 648A426788B; Mon, 17 Sep 2018 01:46:09 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 19062267819; Mon, 17 Sep 2018 01:46:03 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by alsa0.perex.cz (Postfix) with ESMTP id 6B089267809 for ; Mon, 17 Sep 2018 01:46:01 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id n18-v6so10035788ioa.9 for ; Sun, 16 Sep 2018 16:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jDArbQdVww+YSgUKwhIereZD0KDuIxo3XfjQo0Dfyoc=; b=MtSqOS63VH9yjjal86E/bgA2jgcaxL1KyQEcQ7/F7RLWZQ3Y1vZYGZoRUlLEor0FtB B6NLZCup0miL/UXfeOOAOdN/KrAPoV8JC1Nb17n08wPxnp4wjzmvxb4IvR4/BwDet5BJ dyScJ5A5M08ju3b2Si9t6v5eNJAi6WUH1Y8+0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jDArbQdVww+YSgUKwhIereZD0KDuIxo3XfjQo0Dfyoc=; b=TKdT+DEFuvUTW4B6MbY8its0NpvyWbGyuLK4mO2uMxlsYdVrsiCmN2OiFKqUQS+UdK TEzylAEizT0LomEplk6s8BPp/efLBG/w40Nx+ds3OFVWA5BdSfAeKcCbOBYWjdpBfjCx vpH31VCsIXbDsTFy8oM5RRgMBXNxryllietNf/sd5XV7rHl/wP8UACakQ5NjKMsk1oJm Hsw5oLRDM21QqvlkBEV18JVflOltG+a3E9XEQBGJHNRmjvIe58QwURtoPS6cA82qT8VB sQqdpxLWU3QPEannKX9uGHvPejZ4Jhwj2onSxNTANaczVxIG4vEMZ14zHsX+Hu7TMmBV SreA== X-Gm-Message-State: APzg51AK6pDVcIqVKUddElAcRRWWugVS7jc/JGIhpChdJRK2lupK9j4m vEVQB9fTHZTY8Z4gEHxSORi8dGTVtgo= X-Google-Smtp-Source: ANB0VdbTnWOE3EInvMGSi/nCkv1qhWUH1lfh56XEx0Lnwzysok6QZBT5reM0nGV10mZQLwOt7KHbHg== X-Received: by 2002:a6b:c694:: with SMTP id w142-v6mr17833891iof.142.1537141560397; Sun, 16 Sep 2018 16:46:00 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.45.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:45:59 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:42 -0700 Message-Id: <20180916234546.29661-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 3/7] slimbus: core: match device tree based devices correctly X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla device_id for device tree based devices come from dt compatible string, such drivers need not provide non dt style device id table. Match those device using compatible strings. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 262591f..55eda58 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -33,6 +33,10 @@ static int slim_device_match(struct device *dev, struct device_driver *drv) struct slim_device *sbdev = to_slim_device(dev); struct slim_driver *sbdrv = to_slim_driver(drv); + /* Attempt an OF style match first */ + if (of_driver_match_device(dev, drv)) + return 1; + return !!slim_match(sbdrv->id_table, sbdev); } @@ -106,7 +110,7 @@ EXPORT_SYMBOL_GPL(slimbus_bus); int __slim_driver_register(struct slim_driver *drv, struct module *owner) { /* ID table and probe are mandatory */ - if (!drv->id_table || !drv->probe) + if (!(drv->driver.of_match_table || drv->id_table) || !drv->probe) return -EINVAL; drv->driver.bus = &slimbus_bus; From patchwork Sun Sep 16 23:45:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA8B2157B for ; Sun, 16 Sep 2018 23:46:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8AEE29340 for ; Sun, 16 Sep 2018 23:46:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAF572934C; Sun, 16 Sep 2018 23:46:44 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26A9C29340 for ; Sun, 16 Sep 2018 23:46:44 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A34212676AA; Mon, 17 Sep 2018 01:46:12 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4C10B2676AA; Mon, 17 Sep 2018 01:46:04 +0200 (CEST) Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by alsa0.perex.cz (Postfix) with ESMTP id 1C3982677FC for ; Mon, 17 Sep 2018 01:46:02 +0200 (CEST) Received: by mail-it0-f65.google.com with SMTP id 139-v6so8813102itf.0 for ; Sun, 16 Sep 2018 16:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1bcJh9CtfJ4gAb6t6vtjisbCR0PKBNS05ea9K+ric0w=; b=Ev+CCGgnvLIEXmiRTpQCrXBwU5Sr96o05fDv55zIg+z7zwz0OheesH3dewlX9N9eHB 6yZ876AB+oazr67VkYjG3rjV1lY8h/3RN+cfPcvaTuHkiSIpY344ClDhkeIAbxnn6YuD 5CSKr/1swr9ywRZjGSkZxa2UyiQkN3m5rEjA8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1bcJh9CtfJ4gAb6t6vtjisbCR0PKBNS05ea9K+ric0w=; b=EvlpYGQKvhMArrmicmGU8dbK37GX3T2snUlp8AynXeTJ/ZpDWkPzNrYzarSUIfXW0I Rl9oCLQQghkxDMJhhRHzMbh2CWP67WZbGOE1y76Ig6pT73mlJuGTZvZdQAL/SfNaohoK liRiSSJyQacKTo1IKIaO9xwbGHTalcP/xiZWy9FDOMJXcqjn+9ZHrMa6bBbpAWxuO3ky c2YDJBx46LGlusmPYnnf/jNUZgEIjnH9uSVvJKAujUxd58C7y/amXwSc+SyJ5obIaA8B 7XMwwDkAossIMNK68ohPRLpxJah8TzVQUUfQkwPyvrLUo10MhuE3dzoI6Jag3Tj4sCX4 UnVA== X-Gm-Message-State: APzg51DIHuMwBznMONHfZsNVm8eo9w5yU7xD+MaPq3YxAPSz4HW+1TdD htnqUXBDYJtreEK3gZKofbVl9w== X-Google-Smtp-Source: ANB0VdZwJHiLbZJbBZtX/QkrLfVNuaoAO+VWs87iuhwajGLr9YqptxAZFqUbn0bSnsg5cVTWd0ss3w== X-Received: by 2002:a24:aa08:: with SMTP id b8-v6mr10725014itf.49.1537141561414; Sun, 16 Sep 2018 16:46:01 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.46.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:46:01 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:43 -0700 Message-Id: <20180916234546.29661-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 4/7] slimbus: ngd: validate logical address assigned by remote X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla Validate logical address assigned by remote, in failure cases this value is all zeors. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ngd-ctrl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index 8be4d67..b9f2e3f 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1004,6 +1004,7 @@ static int qcom_slim_ngd_get_laddr(struct slim_controller *ctrl, struct slim_eaddr *ea, u8 *laddr) { struct slim_val_inf msg = {0}; + u8 failed_ea[6] = {0, 0, 0, 0, 0, 0}; struct slim_msg_txn txn; u8 wbuf[10] = {0}; u8 rbuf[10] = {0}; @@ -1034,6 +1035,9 @@ static int qcom_slim_ngd_get_laddr(struct slim_controller *ctrl, return ret; } + if (!memcmp(rbuf, failed_ea, 6)) + return -ENXIO; + *laddr = rbuf[6]; return ret; From patchwork Sun Sep 16 23:45:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601933 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B857813AD for ; Sun, 16 Sep 2018 23:46:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A64B129340 for ; Sun, 16 Sep 2018 23:46:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AE502934C; Sun, 16 Sep 2018 23:46:51 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1B4E29340 for ; Sun, 16 Sep 2018 23:46:50 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 15EC52678A9; Mon, 17 Sep 2018 01:46:14 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id BA86F267809; Mon, 17 Sep 2018 01:46:05 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by alsa0.perex.cz (Postfix) with ESMTP id A72AC2676AA for ; Mon, 17 Sep 2018 01:46:03 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id r196-v6so10087621iod.0 for ; Sun, 16 Sep 2018 16:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4mLIm+CPnzkl6UQkh/tstY1IOawXp7bQelRcUAvyv2I=; b=ViIImC8M62l8kYkhVQwEsX4r/wgwu8DdANBxBs04jgwnNbnAkbTwz5mpfspMX9wsJ8 Hv6XZri5hqvK8P7Sdo41iFU3IGqrJpukxmRxMXX4uvpexOLSUw5udG1JmfRNMKpJpw4y E8MKKrrmfGScUPrB99QUPsbefI8C/1Kbs8GWQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4mLIm+CPnzkl6UQkh/tstY1IOawXp7bQelRcUAvyv2I=; b=bWwqOHer5EQxLVJNqZmXrQdcRe/fqk9VPQ4zPVyMJgpFnKfundlWfoBO49YbDYBMus MwX503vl0yqKWE1QN3BuAppCeJPfRBTuggNiOVbCttKQYyESG7rsW80AsAuOp1zZLI88 OCLfSGCKvdFiv0RNj+LpOKFZmi9eCe4jGpeSGs4o5yaq+lvF2yRpkzVFh+BvVMA2R1RZ QZj4zrauB1eSbz3hswDufylcJGws/j+D2Hzsy+iEfPuZ1iRcX1ia9PKYEcbhx5guEJnw +YrpUBhAkERlVNPoNC1Xq9wkMvQnx4vNdiO4EZDA7CfcGvSw4aCy1rYv0pAb3frICe6V /OcA== X-Gm-Message-State: APzg51D49vh/uhOlxJu8/ArlPFpIYcnRxN94d9tETF10aiFZg2GKCILi 0vZcUYI42+PcTAFXFJr/KAMtyA== X-Google-Smtp-Source: ANB0Vdbnw4TiZfe+hVhh/m7DBCal0KaHSVpO0aez7tkwWYq0SVS+bJBhQS8zf5vdnmO5JhIVUuq2pg== X-Received: by 2002:a6b:be83:: with SMTP id o125-v6mr18643055iof.173.1537141562485; Sun, 16 Sep 2018 16:46:02 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.46.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:46:02 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:44 -0700 Message-Id: <20180916234546.29661-6-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 5/7] silmbus: ngd: register controller after power up. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla Register slimbus controller only after finishing powerup sequnce so that we do not endup in situation where core starts sending transactions before the controller is ready. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ngd-ctrl.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index b9f2e3f..0241373 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1238,8 +1238,17 @@ static int qcom_slim_ngd_enable(struct qcom_slim_ngd_ctrl *ctrl, bool enable) pm_runtime_resume(ctrl->dev); pm_runtime_mark_last_busy(ctrl->dev); pm_runtime_put(ctrl->dev); + + ret = slim_register_controller(&ctrl->ctrl); + if (ret) { + dev_err(ctrl->dev, "error adding slim controller\n"); + return ret; + } + + dev_info(ctrl->dev, "SLIM controller Registered\n"); } else { qcom_slim_qmi_exit(ctrl); + slim_unregister_controller(&ctrl->ctrl); } return 0; @@ -1361,11 +1370,6 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev) int ret; ctrl->ctrl.dev = dev; - ret = slim_register_controller(&ctrl->ctrl); - if (ret) { - dev_err(dev, "error adding slim controller\n"); - return ret; - } pm_runtime_use_autosuspend(dev); pm_runtime_set_autosuspend_delay(dev, QCOM_SLIM_NGD_AUTOSUSPEND); @@ -1375,7 +1379,7 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev) ret = qcom_slim_ngd_qmi_svc_event_init(ctrl); if (ret) { dev_err(&pdev->dev, "QMI service registration failed:%d", ret); - goto err; + return ret; } INIT_WORK(&ctrl->m_work, qcom_slim_ngd_master_worker); @@ -1387,8 +1391,6 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev) } return 0; -err: - slim_unregister_controller(&ctrl->ctrl); wq_err: qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi); if (ctrl->mwq) @@ -1460,7 +1462,7 @@ static int qcom_slim_ngd_remove(struct platform_device *pdev) struct qcom_slim_ngd_ctrl *ctrl = platform_get_drvdata(pdev); pm_runtime_disable(&pdev->dev); - slim_unregister_controller(&ctrl->ctrl); + qcom_slim_ngd_enable(ctrl, false); qcom_slim_ngd_exit_dma(ctrl); qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi); if (ctrl->mwq) From patchwork Sun Sep 16 23:45:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0C3E13AD for ; Sun, 16 Sep 2018 23:46:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53C3129340 for ; Sun, 16 Sep 2018 23:46:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47E662934C; Sun, 16 Sep 2018 23:46:58 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8B5829340 for ; Sun, 16 Sep 2018 23:46:57 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 67A7F267892; Mon, 17 Sep 2018 01:46:15 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 266D2267819; Mon, 17 Sep 2018 01:46:06 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by alsa0.perex.cz (Postfix) with ESMTP id 3732A2677FC for ; Mon, 17 Sep 2018 01:46:04 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id 75-v6so10027081iou.11 for ; Sun, 16 Sep 2018 16:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PeH6Ipil7CJB8tr8f+7fACMPhexFa7TfJUCZcP2TPv4=; b=JhtiWx6z2EAkugIUVFF3mdBXCn47MKdK7pJ+zNcau76PFl/LzR0YlIKmSZmiDcAJTZ BegA6txQXHCF1UTovMDhfGyZ+tiFSeGRljIUKH9RrmORZjqHZsIcbxv0kjwF8MySqIwY vPD3xPTir7pagSO/M6yhSYdydYdK/XiWjaFSA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PeH6Ipil7CJB8tr8f+7fACMPhexFa7TfJUCZcP2TPv4=; b=rvh8O1SJS9E7289S1tJvHvxkJa7S8kIbQx/963bNka5O6hNg6Cb46HhpyS7T8Zx99I nmCzJePkjXl6ckqocddxDlIFrs6c70CZktIzN9nzQ90bvto8FiVNbP51oWC4qxo+ICn3 0HLQ8q7Vg6bDhsY4fiR2Vqqh0p7Ie2POeSHnjHlJvQqw7uLVQy6ODCb0z0D7hznkY75r 4elFA7fK4cLbJvi8lJgqO8mKVRuPsuBwBxhNwKFe+fKWeYk4ZcXVO1gK9Vs3Cwma8GV6 Mbpsay7S/LDNbKDO7f1Mzeo05RfELYr6G7W5GCAoQL3KSOowQI7PrAWFY7+aJzcbOmwq wrHw== X-Gm-Message-State: APzg51Bjk8cfwL8sh7Hq0RFPkq/ENQ2B90X2mrtRbGnnn71HPcyhfUDB uaiP84PR9un7d/QBExvikKdb64saf9Y= X-Google-Smtp-Source: ANB0VdaGxTTviRMAbXFeiq8yLxllNIcUn/MzVLJwC87rBav5or4sbxiP7LDZg8gv3seMP0f3/SCdFA== X-Received: by 2002:a6b:1706:: with SMTP id 6-v6mr19948407iox.58.1537141563501; Sun, 16 Sep 2018 16:46:03 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.46.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:46:03 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:45 -0700 Message-Id: <20180916234546.29661-7-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 6/7] slimbus: ngd: return proper error code instead of zero X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla It looks like there is a typo in probe return. Fix it. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ngd-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index 0241373..f48a06e 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1396,7 +1396,7 @@ static int qcom_slim_ngd_probe(struct platform_device *pdev) if (ctrl->mwq) destroy_workqueue(ctrl->mwq); - return 0; + return ret; } static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) From patchwork Sun Sep 16 23:45:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601937 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F83813AD for ; Sun, 16 Sep 2018 23:47:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C42C29340 for ; Sun, 16 Sep 2018 23:47:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EDA82934C; Sun, 16 Sep 2018 23:47:05 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B32529340 for ; Sun, 16 Sep 2018 23:47:04 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B69112678AD; Mon, 17 Sep 2018 01:46:16 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8622F26787E; Mon, 17 Sep 2018 01:46:07 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by alsa0.perex.cz (Postfix) with ESMTP id 7CE3426781A for ; Mon, 17 Sep 2018 01:46:05 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id y10-v6so10037804ioa.10 for ; Sun, 16 Sep 2018 16:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jtP5RlYyGuGTnla229QkTJ0o7oCjU+RhaUaOIesIN8I=; b=KYdzg5j8aQsmO9zzMB1fGl/cmsHCcObkw1uU82ow+JkH13oOCQ8kfuGjKnm5+PfODe EEvvH/I7x6HFe3+k94kZvBmYPuEo+EcWG+U5QQGkZ/segl5xBTPVQBo4kT5y4GMchn1U /P/dCEHKWWZOUs68tpxumjJSpuT/0LGWKTc+8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jtP5RlYyGuGTnla229QkTJ0o7oCjU+RhaUaOIesIN8I=; b=D6dlvAQH9sx/KBQ/YAlQ016p1xsZsALtaSmYI5XxCT3mrRYHpylOokOxcNNAn9ixbx /IrXjPtQyI+UTtRHM3x680cXYoO9OnkOohFrFoyseorN0YR+ro1KYoLnI2GSjrZcneAM 28HprcfBHcLTmPbquazb7eRr/mo1ZGTk7WNzsykFgRrs1tYkznBJPrs4PynhcNlEzRhP JLXlcFr2NFazlU8sAxXoyTxPdAXZddHVcb0KBVSES3Db1WQptxQPo6nYGK+piEtRJSsR UeN0fhcBDDDpJVoVgPmIRepFIK3Bx64ZXVSH+B3Ue86pEd5Sk5G1uaFPNKAInU1Dl7lx 9b3A== X-Gm-Message-State: APzg51BXVQ/QGlQdd5D+Dyv2NYx3sbXtYhDL1FxtaYIBszpNeO7MAAjW FF/eaCFcKf/MdPWUVg9h86x2bg== X-Google-Smtp-Source: ANB0VdZcE4KUnUJpkoR1PBkI4N1uG8oFQC7542pxVGtziJvSEHgSl9I9qvIzjjWrssBVdUMcPIZsZA== X-Received: by 2002:a6b:1416:: with SMTP id 22-v6mr18665180iou.218.1537141564842; Sun, 16 Sep 2018 16:46:04 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.46.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:46:04 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:46 -0700 Message-Id: <20180916234546.29661-8-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 7/7] slimbus: ngd: register ngd driver only once. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla Move ngd platform driver out of loop so that it registers only once. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ngd-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index f48a06e..f7490d7 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1355,7 +1355,6 @@ static int of_qcom_slim_ngd_register(struct device *parent, ngd->base = ctrl->base + ngd->id * data->offset + (ngd->id - 1) * data->size; ctrl->ngd = ngd; - platform_driver_register(&qcom_slim_ngd_driver); return 0; } @@ -1447,6 +1446,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) init_completion(&ctrl->reconf); init_completion(&ctrl->qmi.qmi_comp); + platform_driver_register(&qcom_slim_ngd_driver); return of_qcom_slim_ngd_register(dev, ctrl); }