From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=66.163.188.147 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795964817; b=UurNMLXOzNb7F9ZmUnZURZzNWGXx3PIi8CiMhUZHvmSe+TWHk/oYfxWcuVqpsXbeoiaw McG0XrTUt4XQRmWH93F207eTAInJLIJ8Nk2Wzd8AiJ+xVAuDX66Eqf6vdymAIxkWMUC6o Jx7OrSYoVeDvnGlL7SxkHVrpHsrKeKZkwrq2GIMysOot9pbyLrClFXScBlNh0SnuUtReH SxJG7ZYk/TaZf9g2O20miipGNdeV0Ptq2kuDI7lLNjDKOpH2Wuytjr1CTbylHkl5DsBzp b25vQz5pWgsVczioUtsUjEMmlwuoUM1h+70cuGMK6Y6pyxyoGtJypyK9OMm5hMlVYbg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795964817; h=DMARC-Filter:DKIM-Signature:X-SONIC-DKIM-SIGN:X-YMail-OSG:X-Sonic-MF: X-Sonic-ID:Received:Received:Message-ID:Date:MIME-Version:User-Agent: Subject:To:References:Content-Language:In-Reply-To:From:Content-Type: Content-Transfer-Encoding:X-Mailer; bh=83+Dd6AfDWYcA1B5SXvXpNoLGGpVkCT0tcTywCutllw=; b=LVH26j/OrSgF3TfvggeqyTAhIMtn7PMKxJ7hp9KIWutKXvLhi2aUuMrlwDaoDa7JPkGL qKUunVSSn+G+P/TAEjz5AN+xdxxJiorpAYw2dX4hwNxl8NYgYSX7q5Z7zTMdkGS/unE74 CPo7HIuU2wxBbJ1U1h1XxxgMAfNtvLoOACF6jbHrtzXO25MPEV2+cWcpDi9WNs10A2fYG wHgGd92zoeToqCc7cMP4+LhclvZUrMGK8LSE3V42tSI6zjyEui3O8ukIZwCyMfHxjgxJX Vad73GP8Cnr8+U3CCcKYCR/qzfojrLZN38bkW3yN+S9s7rXCoPUEViBWAP4R6jQtuHg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass header.d=yahoo.com header.i=@yahoo.com header.a=rsa-sha256 header.s=s2048 header.b="qRs5AU/V"; arc=none smtp.remote-ip=66.163.188.147 Received: from sonic303-21.consmr.mail.ne1.yahoo.com (sonic303-21.consmr.mail.ne1.yahoo.com [66.163.188.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBFE0606A323 for ; Sun, 29 Nov 2026 15:06:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DBFE0606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.a=rsa-sha256 header.s=s2048 header.b=qRs5AU/V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1795964815; bh=83+Dd6AfDWYcA1B5SXvXpNoLGGpVkCT0tcTywCutllw=; h=Date:Subject:To:References:In-Reply-To:From:Content-Type:From:Subject:Reply-To:Content-Type; b=qRs5AU/V87e1Pe3PSuOWWz0mZuEz7bDdi3nnDwbu0w/hfT0X+FtE0tyjV+Y6mDsiIkyPwKQZuNhvcGSsSm7bScIz9iRF/5YVHvShKXf7teTLhciiT5JtjlOGG+K3HUxRfu29qhDP0jx0iBtHkCw3wmngKqgBwg4QhQSUCzaNPoOJQ1PKuXjCzmXMiiPW/36YUAv1t6Xs0lNhxB/237qEvwMevpEhGqxqgBzVvZCQbQt8BC1B1kF7OPJaMDHpw6NYGbDK68uwArj5yhgC4UeC6zFHfgvOQtope8mLT4SzH8PhkSzgTCLKNH/ZMJdvo/VCcvBucMJSkvSt2m/YMOjZbg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1795964815; bh=kRugUXhkKv917CulBfzpeYbbaUb6/Tm3aQLI/jQI2d/=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=tcoBWZ0JR5w/WbO9QPk8LGfsqLnzHYBhnkx7fDPCGnBzHJSD6NcksLw8pe+wlrErJDYXOy1MVZkF/yCpTvimfjecW+6x/aLKerV+jZgbQ/c/CkVuLquYT53Ek1N9YyQiPZ8eRrjecJKpByTeukd3U+dwn8js5roVV2h0dqoGPhkYBQTma3WyyaEDHwc1wZUs+6SaXyvF942twmiGGrbRmPfjBqEmvMXhF1K8YqwTMbF4iOiEdkrPMUzkJNp5r3uEC0Aj5rtQ9Err6HXCDx2b887L8qEeghbKGFDlE42XqHXFWLifZFh0JfgW/BiKvkfJiMtqBZ2IgXkzrNocR1LgWA== X-YMail-OSG: 3dlhq2MVM1mW9P6X.n0FP.UFa3IR2jLoNXAid58yXpv9csdjFhLF1hib6Pk8_2e CNjleNuwiz_.nmH.smOLieLEVProX.w6W8clY_2USqHYOQbox7S6vA9pnab7VytrRUj2PevP9ePd xFTqEfhZCNjwPj2Ds21y_a81eHW82I7NYRJ0IPPompi9lD..AO6fOzDUrDNKx7pNkjHjKKSpwGwz z._hIf1jOtNL0GddSTtdPaoQ1fKSEuqMsGqSUUL1me5J3z.P8y.xURGsU8CiWqDCNAFu_LARsMLU KNZUMr0616EHtRk5Uq45qiVqiXMNHf5WEHkIKrbtMgb_7pizdDCdqIeUK_CofG01GpATDBZs.OIC G5p0JGsiQxi1O25Nf9DrTFJkkNh3.vXpzHPB.CXgyPpGIjq0GfdnefvPnBdsuVLAQ5gcl9VApqRs JiAq_o.IAhj1ANh_bhHuPF8mCzj4.2qv0tRoYXoB8NEEs0sJXSyabN96odcWpG3RZKZQl2Ooi2BZ YG_WrRmlwvtlUFz9WorBWPo_DXabZ4t.k_hPZbpX8Y_owoFLu4OYZB5jv.mjnwHSwoYAYHPu0Fm_ mhTpjxYJUXDWAxPPKYdu_X23.ENbTIZgDzzICAKI1qfuOZtsog49J.FGBlnS1iee1MiYC79fvrbC Aq8.J8rXfPcfVzqS4g1b_jrjlNTvk9SbPQ5xgmNSIrvZnUX2LYIo.wJpvkMk5wWfwGnGsDShQ5gl SJZCz661cIw4PF7x2TRNdsymeoZOmmQjGqDrhTfplkIm37aysuqrA42IrlIlmMnS.2zDE4yTTcib .M2oyZUI_YYEa_O0zB9ETubx.obTQhkKriJ9uVOMKBaAnwmUsBV1lrnDz.maxdAaRyYkehk_czC2 52sVLJhn6JWvghuPpPPrmbYPdO0cLKo83C6JIehGaWCCZ8Gv5P2dR7WP_UbodXRNWhxZi.Ofs2Ys wZc3CH7ll0KtIb67IADI1prswiqMaxVSuqlqv.LUZytxzMpD2QCsezdfMbDceWob500CSar.yg.O dFXpj4M5nT.ntTLg6Ol6dgIxAN.aVL2Ns1o1PpmnQZGdhxbxWWrQpeYkyb1axxktkV0fUpJhYisu 0GU.jg5VdWp.nsTrTmVsnmgNfkOS.p0Yc2NCSU0QE2y_Bimv4EmPZAPmKs0mTSyEWk7uYwUEXo0G gf85fmn4Yu1dK9Y47KrKmzEaMUsogJVjjvdKOxx39CkyFT5UfXFZZKOO9Nb38c0URxpuuAC2Ex3V k.7moOUlvbZp2A8NZYNOtkLynTLP0KHCatOPww.6bX9i_DMgkIETLRxoSPGJNeaGZoDZ9ypR_vhD 6WXuUcykMV857c5Ot2SJezaVtCJdKvb9oq7u2EA4W32x3AMHNfGVBhrCP0MO6R4uo1wzmtAN2mDN hnx2cHikesHIVqHEK4oH.JmcCNNeOySOWwLjJcpAYKH2Vd.FcZLfxOcR9tnwiIxveQ.23oo8w1Sz vtCwtt1KPC42jkGYaLs7lrPnP3wclgQxzF3lEQJRbkUejvDtp.TO7F93Jc3_yD0D8MSdLGmQ4jJh u2J2ijMqMBeikWD_mqutVOr462CJJkBEdCqUL_WvmobxdzPUOkZ9tMEOCzqtJTFXoVdIbi7Z0b7E k_5E84YCJqTwDnkNOKLeWQ1T5qByZQWoEG.v08m9OZWij5kmt1AsqUdZbeit2L_JYqib.P56PqyT HCv9Z2LXUjBHL4QDgkNSquLdqYJ9lUyxnl7FON7lcjx0NgwKBK5aml6wSChuHceNXbYYbWkQef6C hxKxTwytx1Iesd.yZYjgAmBrLn349vSsQybzA.VAj4X7T2I6uD_mMAa6yAjo_jlbch_hyf8WN5Us AdjemN11fYqChOGpGSY1f8aP_1.Yt15b._bvi0OLoktr7qvGetcmPASuNaJYuFAw9Yad6jcnzO5T wPpbW1i4EV6cVZNX2Mh_In.JYFFSF3kFnuEseu_F1K9k.fgpLE52GQ6drxd7ly1l7Puhn0y4AKRX POUg_MHKmmDa8jLLUHMn2Q5Qahw9HFJ24mN2RiDiYSRSrywqYgSHpozlCFwpBIo4K8XX4egO_X3X o3xOtn0BNx08uX8.Bg6r_6BbFiyb4Jnh9V0wTuqM6xD5aO_aWxJNXBG_CoAU425bRdP_W1ubvu3P 8.E41pTV05GmojAxYJmCkUTtg2t7_3jxt1SlGmw2U6RnmZo2vRvMOga.Q0ThalUQyPHy_O4faRLq fBH4vjZz0PYP6Tu8CzaR6gurw7IL5vJ1Juu7W.XF6bORORTP8nKdiqEaFcSWz8Fc7Ce0dMYiqNMH UN98hbIg8onF4q9j.Q1LQHveQrdZUuJWkDcLNKw-- X-Sonic-MF: X-Sonic-ID: 2afeba74-01b1-4cb6-8df7-8a388be45662 Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Sun, 29 Nov 2026 15:06:55 +0000 Received: by hermes--production-ir2-7c4859dc89-jpc6b (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 6aa8edea2c435ff0277586adbcd6130b; Sun, 29 Nov 2026 15:06:51 +0000 (UTC) Message-ID: Date: Sun, 29 Nov 2026 16:06:47 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v16 02/15] net: dsa: realtek: rtl8365mb: add chip family infrastructure To: linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linux@armlinux.org.uk, luizluca@gmail.com, maxime.chevallier@bootlin.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alvin.sipraga@analog.com, gusfmora@gmail.com, kuncy7@gmail.com, fabianotassotti@gmail.com, gabonpivovich@gmail.com, contact@c127.dev, o.rempel@pengutronix.de References: Content-Language: pl In-Reply-To: From: Mieczyslaw Nalewaj Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.27100 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Add enum rtl8365mb_family and struct rtl8365mb_family_info, which holds the data shared by all chips of one family: the family id and the init jam table. Fold rtl8365mb_init_jam_common into the family C init jam table (renamed to rtl8365mb_c_init_jam) and drop the separate common jam loop from rtl8365mb_switch_init(), as family D does not use these writes. struct rtl8365mb_chip_info now points to the family info through a family_info member, and all existing chips use the RTL8365MB_FAMILY_C instance. rtl8365mb_get_family_info() and rtl8365mb_is_d() are declared in a new rtl8365mb.h so that the VLAN code can use them too. The available ports of a chip are already described by port_mask in struct rtl8365mb_chip_info, so the family info does not carry a port count. RTL8365MB_FAMILY_D is defined here but no chip uses it yet; it is needed by the following patches, which add family D handling for chips whose register layout differs from the existing ones. No functional change. Tested-by: Gustavo Foletto Mora Tested-by: Stanislaw Pal Tested-by: Oleg Gavrilov Signed-off-by: Mieczyslaw Nalewaj Reviewed-by: Linus Walleij --- drivers/net/dsa/realtek/rtl8365mb.h | 28 ++++++++++ drivers/net/dsa/realtek/rtl8365mb_main.c | 71 ++++++++++++------------ 2 files changed, 62 insertions(+), 37 deletions(-) create mode 100644 drivers/net/dsa/realtek/rtl8365mb.h diff --git a/drivers/net/dsa/realtek/rtl8365mb.h b/drivers/net/dsa/realtek/rtl8365mb.h new file mode 100644 index 0000000..7b0c710 --- /dev/null +++ b/drivers/net/dsa/realtek/rtl8365mb.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _RTL8365MB_H +#define _RTL8365MB_H + +#include "realtek.h" + +enum rtl8365mb_family { + RTL8365MB_FAMILY_C, + RTL8365MB_FAMILY_D, +}; + +struct rtl8365mb_jam_tbl_entry; + +struct rtl8365mb_family_info { + enum rtl8365mb_family family; + const struct rtl8365mb_jam_tbl_entry *jam_table; + size_t jam_size; +}; + +const struct rtl8365mb_family_info * +rtl8365mb_get_family_info(struct realtek_priv *priv); + +static inline bool rtl8365mb_is_d(struct realtek_priv *priv) +{ + return rtl8365mb_get_family_info(priv)->family == RTL8365MB_FAMILY_D; +} + +#endif /* _RTL8365MB_H */ diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c index 6c11c36..8c59b1e 100644 --- a/drivers/net/dsa/realtek/rtl8365mb_main.c +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c @@ -112,6 +112,7 @@ #include "rtl8365mb_qos.h" #include "rtl8365mb_l2.h" #include "rtl8365mb_vlan.h" +#include "rtl8365mb.h" /* Family-specific data and limits */ #define RTL8365MB_PHYADDRMAX 7 @@ -638,20 +639,16 @@ struct rtl8365mb_jam_tbl_entry { }; /* Lifted from the vendor driver sources */ -static const struct rtl8365mb_jam_tbl_entry rtl8365mb_init_jam_8365mb_vc[] = { +static const struct rtl8365mb_jam_tbl_entry rtl8365mb_c_init_jam[] = { { 0x13EB, 0x15BB }, { 0x1303, 0x06D6 }, { 0x1304, 0x0700 }, { 0x13E2, 0x003F }, { 0x13F9, 0x0090 }, { 0x121E, 0x03CA }, { 0x1233, 0x0352 }, { 0x1237, 0x00A0 }, { 0x123A, 0x0030 }, { 0x1239, 0x0084 }, { 0x0301, 0x1000 }, { 0x1349, 0x001F }, { 0x18E0, 0x4004 }, { 0x122B, 0x241C }, { 0x1305, 0xC000 }, - { 0x13F0, 0x0000 }, -}; - -static const struct rtl8365mb_jam_tbl_entry rtl8365mb_init_jam_common[] = { - { 0x1200, 0x7FCB }, { 0x0884, 0x0003 }, { 0x06EB, 0x0001 }, - { 0x03Fa, 0x0007 }, { 0x08C8, 0x00C0 }, { 0x0A30, 0x020E }, - { 0x0800, 0x0000 }, { 0x0802, 0x0000 }, { 0x09DA, 0x0013 }, - { 0x1D32, 0x0002 }, + { 0x13F0, 0x0000 }, { 0x1200, 0x7FCB }, { 0x0884, 0x0003 }, + { 0x06EB, 0x0001 }, { 0x03Fa, 0x0007 }, { 0x08C8, 0x00C0 }, + { 0x0A30, 0x020E }, { 0x0800, 0x0000 }, { 0x0802, 0x0000 }, + { 0x09DA, 0x0013 }, { 0x1D32, 0x0002 }, }; /* SGMII SerDes tuning parameters, lifted from the vendor driver sources. The @@ -704,15 +701,20 @@ struct rtl8365mb_extint { unsigned int supported_interfaces; }; +static const struct rtl8365mb_family_info rtl8365mb_family_c = { + .family = RTL8365MB_FAMILY_C, + .jam_table = rtl8365mb_c_init_jam, + .jam_size = ARRAY_SIZE(rtl8365mb_c_init_jam), +}; + /** * struct rtl8365mb_chip_info - static chip-specific info * @name: human-readable chip name * @chip_id: chip identifier * @chip_ver: chip silicon revision * @port_mask: ports the chip has + * @family_info: data shared by all chips of the same family * @extints: available external interfaces - * @jam_table: chip-specific initialization jam table - * @jam_size: size of the chip's jam table * @num_tx_queues: number of egress queues exposed by the chip * * These data are specific to a given chip in the family of switches supported @@ -724,9 +726,8 @@ struct rtl8365mb_chip_info { u32 chip_id; u32 chip_ver; u32 port_mask; + const struct rtl8365mb_family_info *family_info; const struct rtl8365mb_extint extints[RTL8365MB_MAX_NUM_EXTINTS]; - const struct rtl8365mb_jam_tbl_entry *jam_table; - size_t jam_size; unsigned int num_tx_queues; }; @@ -746,33 +747,32 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = { .name = "RTL8365MB-VC", .chip_id = 0x6367, .chip_ver = 0x0040, + .family_info = &rtl8365mb_family_c, .port_mask = PORT_MASK(GENMASK(3, 0) | BIT(6)), .extints = { { 6, 1, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) }, }, - .jam_table = rtl8365mb_init_jam_8365mb_vc, - .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc), .num_tx_queues = 8, }, { .name = "RTL8367S", .chip_id = 0x6367, .chip_ver = 0x00A0, + .family_info = &rtl8365mb_family_c, .port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)), .extints = { { 6, 1, PHY_INTF(SGMII) | PHY_INTF(HSGMII) }, { 7, 2, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) }, }, - .jam_table = rtl8365mb_init_jam_8365mb_vc, - .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc), .num_tx_queues = 8, }, { .name = "RTL8367SB", .chip_id = 0x6367, .chip_ver = 0x0010, + .family_info = &rtl8365mb_family_c, .port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)), .extints = { { 6, 1, PHY_INTF(MII) | PHY_INTF(TMII) | @@ -781,14 +781,13 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = { { 7, 2, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) }, }, - .jam_table = rtl8365mb_init_jam_8365mb_vc, - .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc), .num_tx_queues = 8, }, { .name = "RTL8367RB-VB", .chip_id = 0x6367, .chip_ver = 0x0020, + .family_info = &rtl8365mb_family_c, .port_mask = PORT_MASK(GENMASK(4, 0) | BIT(6) | BIT(7)), .extints = { { 6, 1, PHY_INTF(MII) | PHY_INTF(TMII) | @@ -796,8 +795,6 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = { { 7, 2, PHY_INTF(MII) | PHY_INTF(TMII) | PHY_INTF(RMII) | PHY_INTF(RGMII) }, }, - .jam_table = rtl8365mb_init_jam_8365mb_vc, - .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc), .num_tx_queues = 8, }, }; @@ -897,6 +894,14 @@ struct rtl8365mb { #define pcs_to_rtl8365mb(_pcs) container_of((_pcs), struct rtl8365mb, pcs) +const struct rtl8365mb_family_info * +rtl8365mb_get_family_info(struct realtek_priv *priv) +{ + struct rtl8365mb *mb = priv->chip_data; + + return mb->chip_info->family_info; +} + static int rtl8365mb_phy_poll_busy(struct realtek_priv *priv) { u32 val; @@ -1375,7 +1380,7 @@ static int rtl8365mb_sds_probe_option(struct realtek_priv *priv) * the cap has been observed on hardware. Raise them likewise, to 0x7FFFF * (~4.19 Gbps, above the HSGMII line rate). The related HSGMII scheduler * line rate register (LINE_RATE_HSG_H, 0x03FA) is already set to its - * maximum by the common init jam table. + * maximum by the family C init jam table. */ static int rtl8365mb_sds_raise_rate_limits(struct realtek_priv *priv) { @@ -3059,30 +3064,22 @@ static int rtl8365mb_change_tag_protocol(struct dsa_switch *ds, static int rtl8365mb_switch_init(struct realtek_priv *priv) { struct rtl8365mb *mb = priv->chip_data; - const struct rtl8365mb_chip_info *ci; + const struct rtl8365mb_family_info *fi; int ret; int i; - ci = mb->chip_info; + fi = mb->chip_info->family_info; - /* Do any chip-specific init jam before getting to the common stuff */ - if (ci->jam_table) { - for (i = 0; i < ci->jam_size; i++) { - ret = regmap_write(priv->map, ci->jam_table[i].reg, - ci->jam_table[i].val); + /* Do any family-specific init jam */ + if (fi->jam_table) { + for (i = 0; i < fi->jam_size; i++) { + ret = regmap_write(priv->map, fi->jam_table[i].reg, + fi->jam_table[i].val); if (ret) return ret; } } - /* Common init jam */ - for (i = 0; i < ARRAY_SIZE(rtl8365mb_init_jam_common); i++) { - ret = regmap_write(priv->map, rtl8365mb_init_jam_common[i].reg, - rtl8365mb_init_jam_common[i].val); - if (ret) - return ret; - } - return 0; } -- 2.53.0