From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Ayush Singh <ayushdevel1325@gmail.com>, greybus-dev@lists.linaro.org
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org, vaishnav@beagleboard.org,
jkridner@beagleboard.org, nm@ti.com,
krzysztof.kozlowski+dt@linaro.org, johan@kernel.org,
elder@kernel.org
Subject: Re: [PATCH v6 2/3] greybus: Add BeaglePlay Linux Driver
Date: Tue, 3 Oct 2023 10:25:05 +0200 [thread overview]
Message-ID: <50a0de57-db28-424a-915d-fc6e00ae4758@linaro.org> (raw)
In-Reply-To: <20231002182454.211165-3-ayushdevel1325@gmail.com>
On 02/10/2023 20:24, Ayush Singh wrote:
> Add the Greybus host driver for BeaglePlay board by BeagleBoard.org.
>
> The current greybus setup involves running SVC in a user-space
> application (GBridge) and using netlink to communicate with kernel
> space. GBridge itself uses wpanusb kernel driver, so the greybus messages
> travel from kernel space (gb_netlink) to user-space (GBridge) and then
> back to kernel space (wpanusb) before reaching CC1352.
>
> This driver directly communicates with CC1352 (running SVC Zephyr
> application). Thus, it simplifies the complete greybus setup eliminating
> user-space GBridge.
>
...
Thank you for your patch. There is something to discuss/improve.
> +
> +static int gb_serdev_init(struct gb_beagleplay *bg)
> +{
> + u32 speed = 115200;
> + int ret;
> +
> + serdev_device_set_drvdata(bg->sd, bg);
> + serdev_device_set_client_ops(bg->sd, &gb_beagleplay_ops);
> + ret = serdev_device_open(bg->sd);
> + if (ret)
> + return dev_err_probe(&bg->sd->dev, ret, "Unable to open serial device");
> +
> + speed = serdev_device_set_baudrate(bg->sd, speed);
Unused value speed. Probably this results in warnings. Plus it is a
confusing code. Check the return value if it is relevant. If it can be
ignored, skip assignment and drop "speed" variable.
Rest looks okay to me after glance (I did not perform full review).
> + serdev_device_set_flow_control(bg->sd, false);
> +
> + return 0;
> +}
> +
> +static int gb_beagleplay_probe(struct serdev_device *serdev)
> +{
> + int ret = 0;
> + struct gb_beagleplay *bg;
> +
> + bg = devm_kmalloc(&serdev->dev, sizeof(*bg), GFP_KERNEL);
> + if (!bg)
> + return -ENOMEM;
> +
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-10-03 8:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-02 18:24 [PATCH v6 0/3] greybus: Add BeaglePlay Greybus Driver Ayush Singh
2023-10-02 18:24 ` [PATCH v6 1/3] dt-bindings: Add beaglecc1352 Ayush Singh
2023-10-03 8:21 ` Krzysztof Kozlowski
2023-10-03 12:09 ` Ayush Singh
2023-10-03 13:07 ` Nishanth Menon
2023-10-03 11:30 ` Nishanth Menon
2023-10-03 12:47 ` Ayush Singh
2023-10-03 13:05 ` Nishanth Menon
2023-10-02 18:24 ` [PATCH v6 2/3] greybus: Add BeaglePlay Linux Driver Ayush Singh
2023-10-03 7:40 ` kernel test robot
2023-10-03 8:25 ` Krzysztof Kozlowski [this message]
2023-10-02 18:24 ` [PATCH v6 3/3] dts: ti: k3-am625-beagleplay: Add beaglecc1352 Ayush Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50a0de57-db28-424a-915d-fc6e00ae4758@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=ayushdevel1325@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=jkridner@beagleboard.org \
--cc=johan@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=vaishnav@beagleboard.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).