Message ID | 20240215220759.976998-13-eajames@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-67738-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp151278dyb; Thu, 15 Feb 2024 14:10:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUiyk9PXGL5eEn/EQms4KS9GyOq//7Y/7N8zM13mkTr8ez4NBbHCilo8Kr5BVZy00/hjNPCDJrZuRGS/qparfyKmdG1cg== X-Google-Smtp-Source: AGHT+IHaDkIU3Syup2DyCbsmdd9yUXmp18FVEtsVIdu2ygHvLZ7zzanF3SLq/usdwHJAkT13pmc2 X-Received: by 2002:a05:622a:4c7:b0:42a:b73d:447e with SMTP id q7-20020a05622a04c700b0042ab73d447emr3745661qtx.15.1708035030437; Thu, 15 Feb 2024 14:10:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708035030; cv=pass; d=google.com; s=arc-20160816; b=s7fzWWA6jcwP2UdSJ+n6wVlYeqkavvesE1maVn2HSR55K/xsOV40fVOp/lTqzTaBRF e9F3DCBxoI+ZvQ5VwXQ5IaeFF5yIkhjtLKA3rbu+tsovoq3KRD1H4Gv/c+nn/u4CxQEv HOeuPmJpQ/SHYtMIe6c9tRaolydc/VxhwXMIb/py88ZZryPqC2+avZf0A1cQYwAC3DRT sHgTmJcxOpTFsv8uJ5GWkB9N4V1fEfHIyxxO03jrbv1SlaX8miz2mCaG1aj9VCb7ZOWH ACJ51DfzfcOWWbFNXJReHih2paLeL4vV9fN/1EaoBRJQPriA3+kpJJw2ixESL5JagUiT XlLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=p4Bd0cE5tZZXjGiUwlW/m21TY8wBk8xiigmq9eJjy/8=; fh=Usz7XAB1EI7Q/DdLEXd449E1MLGpSzqdCCNe5XKh9R0=; b=c8K7TF1y6KWKSuv7XP0svA+HpU8tQMLLktKceOF5scv2DmNXA9B91GhyWmc2Q0PHHg CEje8soHHuXed6+afCDpEPHXn7BvC358wPpAViS0ZWS2r1uF56cv98GB+Bd9xKoP6knk ZmCeebx4gaGjoGK6xPzSWysDLc0rWvJO3A/PUa9EdMAioEyGZ5297z+/O5ZjtFqq5JQY KLncE33dO0kwhJ0rCc54xCnGYpcJ6Q/RmzE9e2FsfW6QTI/2rE6ZOM5Soyc2mzBF31eL eyPmr4scyE9aA1JDP40/i3oX1y6qxmlWXeiKmlf0SijgtZoXkgWcld7LKHNbm+WjG9hD YFiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=GLGaMrg0; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-67738-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67738-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id n10-20020ac8674a000000b0042bf9849fc8si2288938qtp.31.2024.02.15.14.10.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:10:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67738-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=GLGaMrg0; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-67738-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67738-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4457D1C21C6C for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 22:10:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E2001474D0; Thu, 15 Feb 2024 22:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="GLGaMrg0" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3F6913AA41; Thu, 15 Feb 2024 22:08:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034904; cv=none; b=a5rb+9HOI2gy7t7NUAfu/bhuGhukHms/Zl8RsTPYxnno5DzUbjihEINBqppODpFZgmHHJFaxKmX8mB0BjU3I3FGwQ8yYRXQSNGY4mHbD/lkzNQ5MIUFqcdds2WzkR2A/V7gTQjTNcB9kPjnK7gglCLMj1uvyZQMjjqxMFOP1wkE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708034904; c=relaxed/simple; bh=g6m8Cm3ROV7efeeZHUrBzY5Km6nC+Ze0oxF+hQuiVzs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mOhITRF4bMkeUIUV7BPnbzn6IvAzqXw53Q7wsQtsjNFHdRxxv38f0oRx47q5ROvIsR17zKCr1kXuWGHgHheust9UZn6xiYIizo4uO8C1UK2svvykob/zEXOBCnbNSjZn4r2laj9gvE83YGxY0JJUurT6fH4YK6iAwqEUSpkPg+o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=GLGaMrg0; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FM7A2d029978; Thu, 15 Feb 2024 22:08:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=p4Bd0cE5tZZXjGiUwlW/m21TY8wBk8xiigmq9eJjy/8=; b=GLGaMrg0p4kwI0jPAcxpqxebeEsukU+FGmd866Zjg7zHGFf1HxJUf1qQO7kOLeXV57Rg e9y+nfTgz+X0BZqCTKNoYr6MuKrGIhWy+fyO85rT3Z8n9m8MLvpdgUVka63Ln6HdvECx Efk1bUHlTCDOsBCvticam0Bsoq6IzpRfGp7CtibstvJJyZa6tcZI9ht3l+tFqXMifl39 gVW7W0npVinYA6fqV76b8LJ5nGmP89c0bPPwe2s6AAhKhbsb09FUsue4nYSx11iyPqWy iKET9fwQDyxHnJXOPS0PvKHJz82kB4N7ZtdWN+gV2mXP88IEZcolb8oVCGhApq2kA/bv Rw== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w9s0tjy3q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:09 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41FLN4qc009920; Thu, 15 Feb 2024 22:08:08 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w6p6374qe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Feb 2024 22:08:08 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41FM86BB918236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 22:08:08 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 26AD058061; Thu, 15 Feb 2024 22:08:06 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8FD558073; Thu, 15 Feb 2024 22:08:05 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.14.18]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 15 Feb 2024 22:08:05 +0000 (GMT) From: Eddie James <eajames@linux.ibm.com> To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, andi.shyti@kernel.org, eajames@linux.ibm.com, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, sboyd@kernel.org, mturquette@baylibre.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Subject: [PATCH 12/33] fsi: core: Allow cfam device type aliases Date: Thu, 15 Feb 2024 16:07:38 -0600 Message-Id: <20240215220759.976998-13-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240215220759.976998-1-eajames@linux.ibm.com> References: <20240215220759.976998-1-eajames@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 7D2MOM1G1KlY4M5GFPY2YVwo4YalrYB3 X-Proofpoint-ORIG-GUID: 7D2MOM1G1KlY4M5GFPY2YVwo4YalrYB3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_20,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 clxscore=1015 suspectscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150171 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791004539795575812 X-GMAIL-MSGID: 1791004539795575812 |
Series |
fsi: Interrupt support
|
|
Commit Message
Eddie James
Feb. 15, 2024, 10:07 p.m. UTC
Other FSI devices can uses aliases for the device numbering, so
modify the function to get a new minor to allow the cfam type
to use aliases too.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
drivers/fsi/fsi-core.c | 59 +++++++++++++++++++++---------------------
1 file changed, 29 insertions(+), 30 deletions(-)
Comments
Hi Eddie, kernel test robot noticed the following build warnings: https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Eddie-James/dt-bindings-clock-ast2600-Add-FSI-clock/20240216-061934 base: git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host patch link: https://lore.kernel.org/r/20240215220759.976998-13-eajames%40linux.ibm.com patch subject: [PATCH 12/33] fsi: core: Allow cfam device type aliases config: arm64-randconfig-r081-20240216 (https://download.01.org/0day-ci/archive/20240220/202402201532.dvENQrDs-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 36adfec155de366d722f2bac8ff9162289dcf06c) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org> | Closes: https://lore.kernel.org/r/202402201532.dvENQrDs-lkp@intel.com/ smatch warnings: drivers/fsi/fsi-core.c:919 __fsi_get_new_minor() error: testing array offset 'type' after use. vim +/type +919 drivers/fsi/fsi-core.c 3f4ac5b0b27f16 Eddie James 2024-02-15 894 static int __fsi_get_new_minor(struct fsi_slave *slave, struct device_node *np, 3f4ac5b0b27f16 Eddie James 2024-02-15 895 enum fsi_dev_type type, dev_t *out_dev, int *out_index) 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 896 { 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 897 int cid = slave->chip_id; 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 898 int id; 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 899 3f4ac5b0b27f16 Eddie James 2024-02-15 900 if (np) { 3f4ac5b0b27f16 Eddie James 2024-02-15 901 int aid = of_alias_get_id(np, fsi_dev_type_names[type]); ^^^^ if type >= 4 we are in trouble 3f4ac5b0b27f16 Eddie James 2024-02-15 902 3f4ac5b0b27f16 Eddie James 2024-02-15 903 if (aid >= 0) { 3f4ac5b0b27f16 Eddie James 2024-02-15 904 /* Use the same scheme as the legacy numbers. */ 3f4ac5b0b27f16 Eddie James 2024-02-15 905 id = (aid << 2) | type; 3f4ac5b0b27f16 Eddie James 2024-02-15 906 id = ida_alloc_range(&fsi_minor_ida, id, id, GFP_KERNEL); 3f4ac5b0b27f16 Eddie James 2024-02-15 907 if (id >= 0) { 3f4ac5b0b27f16 Eddie James 2024-02-15 908 *out_index = aid; 3f4ac5b0b27f16 Eddie James 2024-02-15 909 *out_dev = fsi_base_dev + id; 3f4ac5b0b27f16 Eddie James 2024-02-15 910 return 0; 3f4ac5b0b27f16 Eddie James 2024-02-15 911 } 3f4ac5b0b27f16 Eddie James 2024-02-15 912 3f4ac5b0b27f16 Eddie James 2024-02-15 913 if (id != -ENOSPC) 3f4ac5b0b27f16 Eddie James 2024-02-15 914 return id; 3f4ac5b0b27f16 Eddie James 2024-02-15 915 } 3f4ac5b0b27f16 Eddie James 2024-02-15 916 } 3f4ac5b0b27f16 Eddie James 2024-02-15 917 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 918 /* Check if we qualify for legacy numbering */ 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 @919 if (cid >= 0 && cid < 16 && type < 4) { ^^^^^^^^ checked too late 641511bfcc5e01 Eddie James 2023-06-12 920 /* 641511bfcc5e01 Eddie James 2023-06-12 921 * Try reserving the legacy number, which has 0 - 0x3f reserved 641511bfcc5e01 Eddie James 2023-06-12 922 * in the ida range. cid goes up to 0xf and type contains two 641511bfcc5e01 Eddie James 2023-06-12 923 * bits, so construct the id with the below two bit shift. 641511bfcc5e01 Eddie James 2023-06-12 924 */ 641511bfcc5e01 Eddie James 2023-06-12 925 id = (cid << 2) | type; 85f4e899de32ba Eddie James 2023-06-12 926 id = ida_alloc_range(&fsi_minor_ida, id, id, GFP_KERNEL); 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 927 if (id >= 0) { 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 928 *out_index = fsi_adjust_index(cid); 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 929 *out_dev = fsi_base_dev + id; 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 930 return 0; 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 931 } 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 932 /* Other failure */ 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 933 if (id != -ENOSPC) 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 934 return id; 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 935 /* Fallback to non-legacy allocation */ 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 936 } 85f4e899de32ba Eddie James 2023-06-12 937 id = ida_alloc_range(&fsi_minor_ida, FSI_CHAR_LEGACY_TOP, 85f4e899de32ba Eddie James 2023-06-12 938 FSI_CHAR_MAX_DEVICES - 1, GFP_KERNEL); 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 939 if (id < 0) 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 940 return id; 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 941 *out_index = fsi_adjust_index(id); 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 942 *out_dev = fsi_base_dev + id; 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 943 return 0; 0ab5fe5374743d Benjamin Herrenschmidt 2018-06-20 944 }
diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c index eb15e5f5a2ee..95f6ce81f8f4 100644 --- a/drivers/fsi/fsi-core.c +++ b/drivers/fsi/fsi-core.c @@ -884,12 +884,37 @@ static int fsi_adjust_index(int index) #endif } -static int __fsi_get_new_minor(struct fsi_slave *slave, enum fsi_dev_type type, - dev_t *out_dev, int *out_index) +static const char *const fsi_dev_type_names[] = { + "cfam", + "sbefifo", + "scom", + "occ", +}; + +static int __fsi_get_new_minor(struct fsi_slave *slave, struct device_node *np, + enum fsi_dev_type type, dev_t *out_dev, int *out_index) { int cid = slave->chip_id; int id; + if (np) { + int aid = of_alias_get_id(np, fsi_dev_type_names[type]); + + if (aid >= 0) { + /* Use the same scheme as the legacy numbers. */ + id = (aid << 2) | type; + id = ida_alloc_range(&fsi_minor_ida, id, id, GFP_KERNEL); + if (id >= 0) { + *out_index = aid; + *out_dev = fsi_base_dev + id; + return 0; + } + + if (id != -ENOSPC) + return id; + } + } + /* Check if we qualify for legacy numbering */ if (cid >= 0 && cid < 16 && type < 4) { /* @@ -918,36 +943,10 @@ static int __fsi_get_new_minor(struct fsi_slave *slave, enum fsi_dev_type type, return 0; } -static const char *const fsi_dev_type_names[] = { - "cfam", - "sbefifo", - "scom", - "occ", -}; - int fsi_get_new_minor(struct fsi_device *fdev, enum fsi_dev_type type, dev_t *out_dev, int *out_index) { - if (fdev->dev.of_node) { - int aid = of_alias_get_id(fdev->dev.of_node, fsi_dev_type_names[type]); - - if (aid >= 0) { - /* Use the same scheme as the legacy numbers. */ - int id = (aid << 2) | type; - - id = ida_alloc_range(&fsi_minor_ida, id, id, GFP_KERNEL); - if (id >= 0) { - *out_index = aid; - *out_dev = fsi_base_dev + id; - return 0; - } - - if (id != -ENOSPC) - return id; - } - } - - return __fsi_get_new_minor(fdev->slave, type, out_dev, out_index); + return __fsi_get_new_minor(fdev->slave, fdev->dev.of_node, type, out_dev, out_index); } EXPORT_SYMBOL_GPL(fsi_get_new_minor); @@ -1052,7 +1051,7 @@ static int fsi_slave_init(struct fsi_master *master, int link, uint8_t id) } /* Allocate a minor in the FSI space */ - rc = __fsi_get_new_minor(slave, fsi_dev_cfam, &slave->dev.devt, + rc = __fsi_get_new_minor(slave, slave->dev.of_node, fsi_dev_cfam, &slave->dev.devt, &slave->cdev_idx); if (rc) goto err_free;