summaryrefslogtreecommitdiff
path: root/drivers/fsi/fsi-master-ast-cf.c
diff options
context:
space:
mode:
authorEddie James <eajames@linux.ibm.com>2020-06-09 16:39:27 -0500
committerJoel Stanley <joel@jms.id.au>2020-09-10 12:22:47 +0930
commit04635a30dd53890fac4e926f91c4ec8619c9227b (patch)
treea20f60529a37c5f26180f0fe6e3e3dad401eef3e /drivers/fsi/fsi-master-ast-cf.c
parent3c3c484850bcb4b28f2377e3d641a32c42af949c (diff)
downloadlwn-04635a30dd53890fac4e926f91c4ec8619c9227b.tar.gz
lwn-04635a30dd53890fac4e926f91c4ec8619c9227b.zip
fsi: master: Add boolean parameter to link_enable function
Add the ability to disable a link with a boolean parameter to the link_enable function. This is necessary so that the master can disable links that it isn't using; for example, links to slaves that fail initialization. Signed-off-by: Eddie James <eajames@linux.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/fsi/fsi-master-ast-cf.c')
-rw-r--r--drivers/fsi/fsi-master-ast-cf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/fsi/fsi-master-ast-cf.c b/drivers/fsi/fsi-master-ast-cf.c
index 85d9be38b32b..57a779a89b07 100644
--- a/drivers/fsi/fsi-master-ast-cf.c
+++ b/drivers/fsi/fsi-master-ast-cf.c
@@ -1039,7 +1039,8 @@ static void fsi_master_acf_setup_external(struct fsi_master_acf *master)
gpiod_direction_input(master->gpio_data);
}
-static int fsi_master_acf_link_enable(struct fsi_master *_master, int link)
+static int fsi_master_acf_link_enable(struct fsi_master *_master, int link,
+ bool enable)
{
struct fsi_master_acf *master = to_fsi_master_acf(_master);
int rc = -EBUSY;
@@ -1049,7 +1050,7 @@ static int fsi_master_acf_link_enable(struct fsi_master *_master, int link)
mutex_lock(&master->lock);
if (!master->external_mode) {
- gpiod_set_value(master->gpio_enable, 1);
+ gpiod_set_value(master->gpio_enable, enable ? 1 : 0);
rc = 0;
}
mutex_unlock(&master->lock);