13 Jul, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Signed-off-by: Jonathan Cameron

    Alexander A. Klimov
     

14 Jun, 2020

1 commit

  • This patch applies the semantic patch:
    @@
    expression I, P, SP;
    @@
    I = devm_iio_device_alloc(P, SP);
    ...
    - I->dev.parent = P;

    It updates 302 files and does 307 deletions.
    This semantic patch also removes some comments like
    '/* Establish that the iio_dev is a child of the i2c device */'

    But this is is only done in case where the block is left empty.

    The patch does not seem to cover all cases. It looks like in some cases a
    different variable is used in some cases to assign the parent, but it
    points to the same reference.
    In other cases, the block covered by ... may be just too big to be covered
    by the semantic patch.

    However, this looks pretty good as well, as it does cover a big bulk of the
    drivers that should remove the parent assignment.

    Signed-off-by: Alexandru Ardelean
    Signed-off-by: Jonathan Cameron

    Alexandru Ardelean
     

15 Dec, 2019

1 commit


05 Apr, 2019

2 commits


22 Sep, 2018

1 commit

  • This changes how the SPI message for the triggered buffer is setup in
    the TI ADS7950 A/DC driver. By using the SPI_CS_WORD flag, we can read
    multiple samples in a single SPI transfer. If the SPI controller
    supports DMA transfers, we can see a significant reduction in CPU usage.

    For example, on an ARM9 system running at 456MHz reading just 4 channels
    at 100Hz: before this change, top shows the CPU usage of the IRQ thread
    of this driver to be ~7.7%. After this change, the CPU usage drops to
    ~3.8%.

    The use of big-endian for the raw data was cargo culted from another
    driver when this driver was originally written. It used an SPI word size
    of 8 bits and big-endian byte ordering to effectively emulate 16 bit
    words.

    Now, in order to inject a CS toggle between each word, we need to use
    the correct word size, otherwise we would get a CS toggle half way
    through each word 16-bit. The SPI subsystem uses CPU byte ordering for
    multi-byte words. So, the data we get back from the SPI is going to be
    CPU endian now no matter what. Converting that to big endian will just
    add overhead on little endian systems so we opt to change the raw data
    format from big endian to CPU endian.

    There is a small risk that this could break some lazy userspace programs
    that use the raw data without checking the data format. We can address
    this if/when it actually comes up.

    Signed-off-by: David Lechner
    Signed-off-by: Jonathan Cameron

    David Lechner
     

24 Jul, 2018

2 commits


23 Aug, 2017

1 commit


20 Aug, 2017

1 commit


09 Aug, 2017

1 commit

  • The driver doesn't have a struct of_device_id table but supported devices
    are registered via Device Trees. This is working on the assumption that a
    SPI device registered via OF will always match a legacy SPI device ID and
    that the MODALIAS reported will always be of the form spi:.

    There is an ACPI method to enumerate such devices via specific ACPI ID
    and use of compatible strings. It will not work for the drivers which
    have no OF match ID table present.

    Besides this could change in the future so the correct approach is to
    have an OF device ID table if the devices are registered via OF.

    Tested-by: David Lechner
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Jonathan Cameron

    Andy Shevchenko
     

15 Jan, 2017

2 commits

  • This changes the reference voltage regulator matching string from "refin"
    to "vref". This is to be consistent with other A/DC chips that also use
    "vref-supply" in their device tree bindings.

    Signed-off-by: David Lechner
    Signed-off-by: Jonathan Cameron

    David Lechner
     
  • This drops the "ti-" prefix from the module name. It makes the module name
    consistent with other iio ti-ads* drivers and it makes the driver work
    with device tree (the spi subsystem drops the "ti," prefix when matching
    compatible strings from device tree).

    Tested working on LEGO MINDSTORMS EV3 with the following device tree node:

    adc@3 {
    compatible = "ti,ads7957";
    reg = ;
    #io-channel-cells = ;
    spi-max-frequency = ;
    vref-supply = ;
    };

    Signed-off-by: David Lechner
    Signed-off-by: Jonathan Cameron

    David Lechner
     

03 Dec, 2016

1 commit