Commit graph

41120 commits

Author SHA1 Message Date
Andrei Emeltchenko
bf0a4a8cfb samples: usb: Update samples for new port name
Use new multi instance interface and new port names.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
1b5227ebc9 samples: fxos8700-hid: Use HID Device interface
Refactor sample using new HID Device interface.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
78f81fb3be tests: hid: Use HID Device interface
Use new HID Device interface for tests/boards/intel_s1000_crb

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
0ccc28c4a8 samples: hid-mouse: Refactor and use new HID Device interface
Refactor of hid-mouse and using new HID Device interface.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
6cf619f549 samples: hid: Use HID Device interface for samples
Use new HID Device interface for HID sample

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
ca85890dc2 usb: hid: Add HID Device concept
Add HID Device associated with the instance of the HID. This allows to
create several HID instances for multifunction composite device.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
c725a90084 usb: hid: Add configuration options for second HID instance
Add configuration option for enabling second HID Device

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
6aefb16964 usb: cdc_acm: Add menuconfig option for multiple instances
Add menuconfig option to select another instance of CDC ACM device.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
5c5bb7409b usb: cdc_acm: Add macros for multi instance configuration
Add macros for defining multiple instances of CDC ACM devices.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
11201a1236 usb: cdc_acm: Use usb_cfg_data from config_info
Use saved data in dev->config->config_info.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
b48a8c3247 usb: device: Add composite status callback
Add new status callback with usb_cfg_data parameter to be able to
identify instance callback.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
9ef8ad412f usb: Refactor usb_interface_config callback
Add interface parameter to interface configuration callback to be able
to configure several instances of the same class.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
b5786aded7 usb: cdc_acm: Correct debug logging
Remove extra newline characters.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Andrei Emeltchenko
eb86b5ccc5 usb: cdc_acm: Allow to create several CDC ACM devices
Change global device pointer to device list where every device
registers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-02-08 11:23:04 -05:00
Luiz Augusto von Dentz
e919054155 Bluetooth: GATT: Add option to enforce client change-unware state
This adds BT_GATT_ENFORCE_CHANGE_UNAWARE option which when enable
returns -EAGAIN when notifying or indicating if the client is
change-unware to conform with following statement on the spec:

  'BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part G page 2350:
   Except for the Handle Value indication, the  server shall not send
   notifications and indications to such a client until it becomes
   change-aware.'

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Luiz Augusto von Dentz
aecf7c7076 Bluetooth: GATT: Store Client features
Client features shall be persisted across connections.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Luiz Augusto von Dentz
3cccf27b2d Bluetooth: GATT: Persist Client Features config only when paired
BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part G page 2405:

  'For clients with a trusted relationship, the characteristic value
  shall be persistent across connections. For clients without a
  trusted relationship the characteristic value shall be set to the
  default value at each connection.'

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Luiz Augusto von Dentz
daac1fa77a Bluetooth: GATT: Implement Robust Caching
This implement Robust Caching which is mandatory when Database Hash and
Service changed Characteristics are supported.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Luiz Augusto von Dentz
a3bca71a5e Bluetooth: GATT: Implement Database Hash
This implements the Database Hash characteristic which generates a hash
with the contents of certain attributes. The generation of hash is
usually offloaded to the systemwq using a delayed work so that when
application register multiple services only one hash needs to be
calculated.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Luiz Augusto von Dentz
ad9846b928 Bluetooth: GATT: Implement Client Supported Features
The Client Supported Features characteristic is used by the client to
inform the server which features are supported by the client.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Luiz Augusto von Dentz
408edcfcdb Bluetooth: Kconfig: Add menu for ATT and GATT options
This move Kconfig options for ATT and GATT to a dedicated menu.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Luiz Augusto von Dentz
753a6d4f20 Bluetooth: Kconfig: Add BT_GATT_CACHING
This adds BT_GATT_CACHING option which can be used to enable support
for Client Supported Features and Database Hash characteristics.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Luiz Augusto von Dentz
f2925e768b Bluetooth: Add definitions for GATT Caching
This adds the definitions for the GATT Caching features.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-02-08 18:07:34 +02:00
Jan Van Winkel
d5b71ca756 gui: Corrected typo in object realign Kconfig option
Corrected typo in lv_conf.h for object realign Kconfig option.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-02-08 09:35:18 -06:00
Kumar Gala
2b23e04514 spi: spi_dw: Cleanup stale Kconfig symbols that should be DT
Instance 2 & 3 for some reason never transitioned CONFIG_SPI_*_IRQ_* to
DT prefix.  Fix that since those Kconfig symbols will never exist.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 09:34:37 -06:00
Kumar Gala
68d9ac0ab5 arch: arm: mpu: Remove dead Kconfig reference
CONFIG_APPLICATION_MEMORY doesn't exist anymore, so the bit of code in
arm_core_mpu_dev.h related to it is dead and should be removed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 09:30:43 -06:00
Andrzej Puzdrowski
40da5f3f40 usb/class/usb_dfu: use predefined string for image descriptors
Use predefined string for images string descriptors instead
of from DTS build-time generated labels.
This labels will be deprecated.

String content are kept the same as before.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-02-08 09:13:09 -06:00
Andrzej Puzdrowski
ee7dfc1b34 usb/class/usb_dfu: use flash_map data instead of macro labels
Now flash_map is proper place to obtain all information about
flash-areas boundaries.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-02-08 09:13:09 -06:00
Findlay Feng
6199e97836 usb/class/usb_dfu: align to changes in dfu subsys'es
Changes in flash_map API makes flash_area structure proper
interface for point the image area instead of direct flash-bank-offsets.

This patch align code to changed APIa and allows to support operation
on the partition in any flash device.

Signed-off-by: Findlay Feng <i@fengch.me>
2019-02-08 09:13:09 -06:00
Findlay Feng
692b88ef36 ext/lib/mgmt/mcumgr: align zephyr port to changes in dfu sybsy'es
Changes in flash_map API makes flash_area structure proper
interface for point the image area instead of direct flash-bank-offsets.

This patch align code to changed APIa and allows to support operation
on the partition in any flash device.

Signed-off-by: Findlay Feng <i@fengch.me>
2019-02-08 09:13:09 -06:00
Findlay Feng
2d2e1614b5 dfu/flash_img: use flash_map instead of flash API
Patch introduces flash_map subsystem to operate on flash
image instead of direct operation using flash_driver API.
Changes allows to support operation on the image in any flash
device.

flash_map was not available when this subsystem was introduced.

Signed-off-by: Findlay Feng <i@fengch.me>
2019-02-08 09:13:09 -06:00
Findlay Feng
04bf2e1bd1 dfu/mcuboot: use flash_map instead of flash API
Patch introduces flash_map subsystem to operate on flash
footprint instead of direct operation using flash_driver API.
Flash area ID is used in API instead of direct flash-bank-offsets.
Changes allows to support operation on the partition in any flash
device.

flash_map was not available when this subsystem was introduced.

Signed-off-by: Findlay Feng <i@fengch.me>
2019-02-08 09:13:09 -06:00
Nathaniel Graff
0ebb98ff1f samples/basic/fade_led: Add support for HiFive 1
Blinks the blue channel of the RGB LED

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-02-08 09:09:35 -06:00
Nathaniel Graff
ee680a9ac6 boards/hifive1: Enable PWM peripheral driver
Enable the PWM peripheral driver on HiFive 1.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-02-08 09:09:35 -06:00
Nathaniel Graff
3dade9e7a6 soc/sifive-freedom: Enable PWM peripheral in dts
Adds the PWM peripheral to the FE310 DTS and DTS fixup.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-02-08 09:09:35 -06:00
Nathaniel Graff
1dc3cc7fc6 drivers/pwm: Driver for SiFive PWM peripheral
The PWM driver can only control channels 1-3 of the PWM peripheral, not
channel 0. This is an artifact of the peripheral's design.

Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
2019-02-08 09:09:35 -06:00
Marc Herbert
a49f9ebb2e doc/CMakeLists.txt: find sphinx-build-3 before sphinx-build
On (at least) Fedora the /usr/bin/sphinx-build binary always belong to
python2-sphinx which results in a confusing "cannot import name
DEVNULL" error below (DEVNULL is available from python 3.3).

Tell find_program() to look for sphinx-build-3 first and then
sphinx-build next.

(shorten) Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sphinx/config.py",
    line 161, in __init__ execfile_(filename, config)
  ...
  File "conf.py", line 17, in <module>
    from subprocess import CalledProcessError, check_output, DEVNULL
ImportError: cannot import name DEVNULL

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-02-08 09:09:51 -05:00
Alberto Escolar Piedras
79680dfe9c doc: native_posix: Add section about subsystems' backends
Add section to describe a bit the currently available subsystems
backends for native_posix

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2019-02-08 09:09:17 -05:00
Piotr Zięcik
d02e3ebd4c power: Eliminate SYS_PM_* power states.
The power management framework used two different abstractions
to describe power states. The SYS_PM_* given coarse information
what kind of power state (low power or deep sleep) was used,
while the SYS_POWER_STATE_* abstraction provided information
about particular power mode.

This commit removes the SYS_PM_* abstraction as the same
information is already carried in SYS_POWER_STATE_*.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-08 09:07:00 -05:00
Jukka Rissanen
7f784153c1 net: socket: Dispatch all AF_CAN handling to sockets_can.c
The code was unnecessarily checking protocol for AF_CAN.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-08 16:01:49 +02:00
Jukka Rissanen
989eeaf96b net: canbus: Set link address type correctly
The link address type should be CANBUS of course.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-08 16:01:49 +02:00
Jukka Rissanen
c1d5cc26c1 net: sockets: Remove extra "default n" setting from config
No need to say "default n" as that is the implicit default.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-08 16:01:49 +02:00
Jukka Rissanen
a79e5ab916 net: shell: Add AF_CAN and AF_PACKET support to "net conn" command
Invalid values were printed for CAN or PACKET sockets for
"net conn" command.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-08 16:01:49 +02:00
Jukka Rissanen
9ac35128e1 net: socket_can: Make sure that things work without IPv4
No need to enable IPv4 any more as that is now optional.
This saves some memory as the application can work without
IPv4, IPv6, UDP or TCP.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-08 16:01:49 +02:00
Anas Nashif
8e5ac20665 counter: qmsi: use correct function prototype
rtc_qmsi_cancel_alarm requires channel id argument.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-08 08:56:45 -05:00
Savinay Dharmappa
f2f049d891 tests: drivers: counter: Enable tests
patch enables tests for qmsi counters and rtc.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-08 08:56:45 -05:00
Savinay Dharmappa
60348e8081 drivers: counter: incorporate changes of api name and signature.
patch incorporates new api name and signature changes.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-08 08:56:45 -05:00
Piotr Zięcik
59da574601 soc: quark_se: Fixed build after recent changes in Power Management.
This commit adds the missing #ifdefs fixig build when low power states
are not enabled.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-02-08 08:56:05 -05:00
Marti Bolivar
5591ca2374 sanitycheck: various fixes for device testing
Device testing has various problems:

- the main thread doesn't halt the serial monitoring thread when an
  error occurs while flashing, meaning flash errors can look like
  timeouts

- serial_line is unbound if the ser.readline() call raises an
  exception, so the following "if serial_line" would raise NameError
  in that case

- the serial monitoring thread is not a daemon, so exceptions or
  errors in the handle() thread that cause thread exit will leave the
  process sitting around until the serial monitoring thread has a
  chance to exit

Fix these issues:

- Rewrite the serial monitoring thread as a select loop over the
  serial port file descriptor and a pipe shared by the main thread and
  serial monitoring thread. If flashing fails, the main thread uses
  the pipe to signal to the serial monitoring thread that it should
  exit.

- Make sure serial_line is always bound when read.

- Mark the serial thread daemonic.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-02-08 08:08:32 -05:00
Marti Bolivar
303b52268a sanitycheck: print flash output if VERBOSE
If the user has requested verbose output, then use check_call() when
running the flash target so that the build system output goes to the
controlling terminal's stdout instead of being swallowed.

This makes it easier to debug flashing failures.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-02-08 08:08:32 -05:00