From patchwork Mon Feb 12 05:15:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 127921 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp2878531ljc; Sun, 11 Feb 2018 21:16:35 -0800 (PST) X-Google-Smtp-Source: AH8x226qg9M5BQLhFtQ/4Aukav0is1oQpOiJp//VpZ44o6gihwqpynfV2Xaqy9BzCCgivbsiDlJH X-Received: by 10.101.80.202 with SMTP id s10mr8382873pgp.226.1518412595792; Sun, 11 Feb 2018 21:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518412595; cv=none; d=google.com; s=arc-20160816; b=BI4jSjaC/WqTuiT0YTghIi4TDcAsLyi0+cfWgrMFzsF2b78JStIs9gK995dXNbWB6D nKxQgOozAr6JLKeqTwXNwAUvt0mH8igKzfgol7AEP8UVxTYFeQR5G4vIhUm/Ph8JJOmv lykb/JDU9bUOvtsB+jPbT6IimGOEskWK170Pc+Su6SOD44IXZxS+7KalVJM/lnQoLGh5 TaBdjIFq9HOgTGHt5xUt07kUxaQ4Bw1/kmSyRO72WCLpEigPI5I7aVhzhJ8MqzGpQ84R QR+Qp2FjQGFDvn2U/KGW0cTn5/6SpmJ7NK28CEP5/d/eihFLbfsverPyiLpBN7dO7DFm h+Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=0YPgz20WbaJ8Kb2Eg5km6ffNOOB9VrrQBKR2xwjRQkM=; b=JcK8NZ01cgp8ZgBsrWbqcVSI20yJv3XDXVWdAZPPaNnvAhCKFFWYn/b1SxCulPpBxB PdpoBzRJCXXy1zcrhx5G2JkQjc1jmEZKX6o/9nPgixX5l/Abq8+GZsB+GO9UJUah8IA/ HG5XAiwI8BXIq0yDGPhjjMK2IjlkR+0Cig12Sh1/hjnrP2VcHalyEMlZwjzg7WLtA8o6 yF/yUUlNhB7kPZMRqa72dOjeDBEgA8LfjDcnH446B0O8AAcccTurb1ZcJS20lbsd19Go z0sKtRk5tKXGBF1Zt1dPE0M72KdW8nCAz65fx5AdQEjIxKR6OtdCS0ulmopbP9ZATCm8 0T4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=h3/EOd54; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b89-v6si3047528plb.809.2018.02.11.21.16.35; Sun, 11 Feb 2018 21:16:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=h3/EOd54; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751459AbeBLFQb (ORCPT + 13 others); Mon, 12 Feb 2018 00:16:31 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:46482 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751263AbeBLFQY (ORCPT ); Mon, 12 Feb 2018 00:16:24 -0500 Received: by mail-pg0-f68.google.com with SMTP id a11so6810568pgu.13; Sun, 11 Feb 2018 21:16:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=0YPgz20WbaJ8Kb2Eg5km6ffNOOB9VrrQBKR2xwjRQkM=; b=h3/EOd54qprjwopgxH2ghm/58hyKPyNeCH/8lREjHOHNykZvsoEW8aN8BFkB7WUuEK l+z33bxCVN9v2Rfs86DBLfwobX4i1F9UgUHqPFG24vlp1ENw1N5MXoKAjXxdCfgLxHe3 zYOJM7yGm1LpSn4PQamLi4Ffz6hd6xIH8vl8PE+MfMR6KBma4wUd0uABMWSVTd/sNzod UMJG4C2gk+NXMdv0nLLNd/TQTb1SEI9T0LUDFzIjpVgND0v6wMUAmk1X1CaagslLHOoR 54WJawhKUxj3UsV9s0mx0TP6evjV2j/7/bxX1cr6UrXXM6jydpqGs/DypshlBVi6pU8H WLVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=0YPgz20WbaJ8Kb2Eg5km6ffNOOB9VrrQBKR2xwjRQkM=; b=evU3s+94IKLYcefSoCYwJFl8cEbnKk1kqof5iTZQmKJWE0kaQzq7hPndXiVDRXdAC/ eE0HBRHFZ0kzs088Veuj9zcrpYuQpFYvvu8GdbW155K76Q7vO2bw8N7OgYLNsA9vLMLQ YaGMAW/mpswrept79MlgzqugaZ6UbtXvvJ7VDxabO/ABblMkd3HyHfv5xqYj6v7DC9KB VZf/++GvAfdb8Cd3qgX72onDXj2p/DDkGFlWq9O4A526aOR6ZkvBte45/rfdUREgyq7O uf+e0BEc8nUJTlEDBSu2YSL71mOnH0QA58b2UJmCUtijspp2ULTh/XokxcuUbYbmr2ul 4TUQ== X-Gm-Message-State: APf1xPBEEontAB+/yzb5Omi/Nh2Fn1JOPkGM64oqYPJ02FysM+cjGv// K/yyV1H3mcOK0B8Djhmgyf8= X-Received: by 10.98.63.15 with SMTP id m15mr10338014pfa.221.1518412583759; Sun, 11 Feb 2018 21:16:23 -0800 (PST) Received: from aurora.jms.id.au ([203.0.153.9]) by smtp.gmail.com with ESMTPSA id e88sm27660643pfl.80.2018.02.11.21.16.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 21:16:23 -0800 (PST) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 12 Feb 2018 15:46:15 +1030 From: Joel Stanley To: Greg Kroah-Hartman , Rob Herring , Mark Rutland Cc: Jeremy Kerr , Christopher Bostic , Brad Bishop , Edward James , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 01/10] fsi: Add fsi_master_rescan() Date: Mon, 12 Feb 2018 15:45:40 +1030 Message-Id: <20180212051549.8575-2-joel@jms.id.au> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180212051549.8575-1-joel@jms.id.au> References: <20180212051549.8575-1-joel@jms.id.au> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeremy Kerr We'll want non-core fsi code to trigger a rescan, so introduce a non-static fsi_master_rescan() function. Use this for the existing unscan/scan behaviour too. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Reviewed-by: Christopher Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 10 ++++++++-- drivers/fsi/fsi-master.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) -- 2.15.1 diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index e318bf8c623c..6e5aa9b26665 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -762,14 +762,20 @@ static void fsi_master_unscan(struct fsi_master *master) device_for_each_child(&master->dev, NULL, fsi_master_remove_slave); } +int fsi_master_rescan(struct fsi_master *master) +{ + fsi_master_unscan(master); + return fsi_master_scan(master); +} +EXPORT_SYMBOL_GPL(fsi_master_rescan); + static ssize_t master_rescan_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct fsi_master *master = to_fsi_master(dev); int rc; - fsi_master_unscan(master); - rc = fsi_master_scan(master); + rc = fsi_master_rescan(master); if (rc < 0) return rc; diff --git a/drivers/fsi/fsi-master.h b/drivers/fsi/fsi-master.h index 12f7b119567d..18bd4ad79356 100644 --- a/drivers/fsi/fsi-master.h +++ b/drivers/fsi/fsi-master.h @@ -40,4 +40,6 @@ struct fsi_master { extern int fsi_master_register(struct fsi_master *master); extern void fsi_master_unregister(struct fsi_master *master); +extern int fsi_master_rescan(struct fsi_master *master); + #endif /* DRIVERS_FSI_MASTER_H */