lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 5 Dec 2018 16:17:18 +0100
From:   Anatolij Gustschin <agust@...x.de>
To:     Song Qiang <songqiang1304521@...il.com>
Cc:     johan@...nel.org, gregkh@...uxfoundation.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: usb: thoughts of adding more support for FT232H

Hi,

On Wed, 5 Dec 2018 22:10:40 +0800
Song Qiang songqiang1304521@...il.com wrote:
...
>I've been developing some iio device drivers and found that some people
>would like to test their devices with a qemu system which requires an
>i2c or spi port on our development hosts. Usually this is achieved with
>a DLN-2 adapter, while this is a bit difficult for me because it costs
>~175$ in my country. Then I found that FTDI's FT232H supports both these
>two modes and costs only less than 5$ but without full support in kernel.
>The ftdi-sio driver supports FT232H only as a serial converter.
>So I'm planning to write a mfd driver for it supports both these three
>modes, here are my thoughts:

There already has been a discussion [1] about adding an MFD driver for
FT232H, since the operating modes are mutually exclusive (and bus pins
shared between different modes), the MFD approach doesn't seem to be
a good fit.

>  - This device cannot support these three modes together because they
>    share some common pins, so I'm planning to add a sysfs entry
>    'current_mode' for selecting which mode the device should be working
>    on.
>  - This device is in uart mode on reset, so default mode would be reset,
>    too. This also helps for people only want to use this as a serial
>    converter feels nothing has happened (compatible).
>  - I was trying to reuse the ftdi-sio driver but it seems like mfd can
>    only register platform devices, while this is a usb driver. I may
>    have to copy some functions from this driver.
>
>Would you share any ideas? I'd appreciate it.

There is a patch series [2] adding an interface driver for FT232H-
based adapter devices, it already supports adding custom MPSSE based
SPI busses with SPI slaves for a custom USB PID. It already supports
adding custom CBUS-/MPSSE-GPIO adapters for user-defined USB PID.
Adding I2C driver/adapter support should be easy, too. Maybe you can
re-use it.

Thanks,
Anatolij

[1] https://patchwork.kernel.org/patch/9828985
[2] https://patchwork.kernel.org/project/linux-usb/list/?series=48255

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ