03 Sep, 2020

1 commit

  • rc-core kapi uses nanoseconds for infrared durations for receiving, and
    microseconds for sending. The uapi already uses microseconds for both,
    so this patch does not change the uapi.

    Infrared durations do not need nanosecond resolution. IR protocols do not
    have durations shorter than about 100 microseconds. Some IR hardware offers
    250 microseconds resolution, which is sufficient for most protocols.
    Better hardware has 50 microsecond resolution and is enough for every
    protocol I am aware off.

    Unify on microseconds everywhere. This simplifies the code since less
    conversion between microseconds and nanoseconds needs to be done.

    This affects:
    - rx_resolution member of struct rc_dev
    - timeout member of struct rc_dev
    - duration member in struct ir_raw_event

    Cc: "Bruno Prémont"
    Cc: Hans Verkuil
    Cc: Maxim Levitsky
    Cc: Patrick Lerda
    Cc: Kevin Hilman
    Cc: Neil Armstrong
    Cc: Jerome Brunet
    Cc: Martin Blumenstingl
    Cc: Sean Wang
    Cc: Matthias Brugger
    Cc: Patrice Chotard
    Cc: Maxime Ripard
    Cc: Chen-Yu Tsai
    Cc: "David Härdeman"
    Cc: Benjamin Valentin
    Cc: Antti Palosaari
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Sean Young
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation version 2 of the license this driver is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this software if not see http www gnu org
    licenses

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 8 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190529141333.861653206@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

05 Oct, 2018

1 commit

  • This can be done with c99 initializers, which makes the code cleaner
    and more transparent. It does require gcc 4.6, because of this bug
    in earlier versions:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676

    Since commit cafa0010cd51 ("Raise the minimum required gcc version to
    4.6"), this is the case.

    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Sean Young
     

20 Aug, 2017

2 commits

  • RC_TYPE is confusing and it's just the protocol. So rename it.

    Suggested-by: Hans Verkuil
    Signed-off-by: Sean Young
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Sean Young
     
  • When an ir-spi is registered, you get this message.

    rc rc0: Unspecified device as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0

    "Unspecified device" refers to input_name, which makes no sense for IR
    TX only devices. So, rename to device_name.

    Also make driver_name const char* so that no casts are needed anywhere.

    Now ir-spi reports:

    rc rc0: IR SPI as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0

    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Sean Young
     

30 Jan, 2017

2 commits

  • The driver type can be assigned immediately when an RC device
    requests to the framework to allocate the device.

    This is an 'enum rc_driver_type' data type and specifies whether
    the device is a raw receiver or scancode receiver. The type will
    be given as parameter to the rc_allocate_device device.

    Change accordingly all the drivers calling rc_allocate_device()
    so that the device type is specified during the rc device
    allocation. Whenever the device type is not specified, it will be
    set as RC_DRIVER_SCANCODE which was the default '0' value.

    Suggested-by: Sean Young
    Signed-off-by: Andi Shyti
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Andi Shyti
     
  • unknown and other are for IR protocols for which we have no decoder,
    so the raw IR drivers have no chance of generating them. cec is not
    an IR protocol.

    Signed-off-by: Sean Young
    Cc: Jiri Kosina
    Cc: Benjamin Tissoires
    Cc: Bruno Prémont
    Signed-off-by: Mauro Carvalho Chehab

    Sean Young
     

29 Jun, 2015

1 commit


26 Jul, 2014

1 commit

  • The basic API of rc-core used to be:

    dev = rc_allocate_device();
    dev->x = a;
    dev->y = b;
    dev->z = c;
    rc_register_device();

    which is a pretty common pattern in the kernel, after the introduction of
    protocol arrays the API looks something like:

    dev = rc_allocate_device();
    dev->x = a;
    rc_set_allowed_protocols(dev, RC_BIT_X);
    dev->z = c;
    rc_register_device();

    There's no real need for the protocols to be an array, so change it
    back to be consistent (and in preparation for the following patches).

    [m.chehab@samsung.com: added missing changes at some files]
    Signed-off-by: David Härdeman
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     

12 Mar, 2014

1 commit

  • The allowed and enabled protocol masks need to be expanded to be per
    filter type in order to support wakeup filter protocol selection. To
    ease that process abstract access to the rc_dev::allowed_protos and
    rc_dev::enabled_protocols members with inline functions.

    Signed-off-by: James Hogan
    Reviewed-by: Antti Seppälä
    Signed-off-by: Mauro Carvalho Chehab

    James Hogan
     

02 Sep, 2013

1 commit

  • When picolcd is switched into bootloader mode (for FW flashing) make
    sure not to try to dereference NULL-pointers of feature-devices during
    unplug/unbind.

    This fixes following BUG:
    BUG: unable to handle kernel NULL pointer dereference at 00000298
    IP: [] picolcd_exit_framebuffer+0x1b/0x80 [hid_picolcd]
    *pde = 00000000
    Oops: 0000 [#1]
    Modules linked in: hid_picolcd syscopyarea sysfillrect sysimgblt fb_sys_fops
    CPU: 0 PID: 15 Comm: khubd Not tainted 3.11.0-rc7-00002-g50d62d4 #2
    EIP: 0060:[] EFLAGS: 00010292 CPU: 0
    EIP is at picolcd_exit_framebuffer+0x1b/0x80 [hid_picolcd]
    Call Trace:
    [] picolcd_remove+0xcb/0x120 [hid_picolcd]
    [] hid_device_remove+0x59/0xc0
    [] __device_release_driver+0x5a/0xb0
    [] device_release_driver+0x1f/0x30
    [] bus_remove_device+0x9d/0xd0
    [] device_del+0xd5/0x150
    [] hid_destroy_device+0x24/0x60
    [] usbhid_disconnect+0x1b/0x40
    ...

    Signed-off-by: Bruno Prémont
    Cc: stable@kernel.org
    Signed-off-by: Jiri Kosina

    Bruno Prémont
     

25 Feb, 2013

1 commit

  • This allows the hid drivers to be independent from the transport layer.

    The patch was constructed by replacing all occurences of
    usbhid_submit_report() by its hid_hw_request() counterpart.
    Then, drivers not requiring USB_HID anymore have their USB_HID
    dependency cleaned in the Kconfig file.

    Finally, few drivers still depends on USB_HID. Many of them
    are requiring the io wait callback. They are found in the next patch.

    Signed-off-by: Benjamin Tissoires
    Reviewed-by: Mika Westerberg

    For the sensor-hub part:
    Tested-by: Mika Westerberg
    Signed-off-by: Jiri Kosina

    Benjamin Tissoires
     

01 Nov, 2012

1 commit

  • Commit c003ab1bedf0 ("[media] rc-core: add separate defines for
    protocol bitmaps and numbers") overlooked hid-picolcd.
    This patch (against git.linuxtv.org/media_tree.git, branch
    staging/for_v3.8) fixes the compilation breakage.

    Signed-off-by: David Härdeman
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     

09 Sep, 2012

1 commit

  • Smatch complains that the NULL checking in this function is not
    consistent and could lead to a NULL dereference. The comments say that
    we should return here if rc_dev is NULL so I've changed the test to
    match the comment.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Bruno Prémont
    Signed-off-by: Jiri Kosina

    Dan Carpenter
     

05 Sep, 2012

1 commit


15 Aug, 2012

1 commit