Date   

Network outage for FD.io and ZephyrProject.org

Andrew Grimberg <agrimberg@...>
 

We are currently aware of accessibility issues to the CI infrastructure
for FD.io and ZephyrProject.org. We have been tracking the issue since
it started at 21:36 PDT (04:36 UTC).

At the present moment we cannot offer an ETA on a resolution to the
problems.

-Andy-

--
Andrew J Grimberg
Systems Administrator
Release Engineering Team Lead
The Linux Foundation


Re: [RFC] net: New API for applications to send and receive data

Johan Hedberg
 

Hi Jukka,

On Wed, Apr 27, 2016, Jukka Rissanen wrote:
+/**
+ * @brief Callback that is called when there is something received from
+ * the network.
+ *
+ * @details It is callback responsibility to release the net_buf when the
+ * data is no longer needed. The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error
+ * @param iov List of net_buf that contain data
+ * @param user_data User supplied data
+ */
+typedef void (*net_readv_cb_t)(struct net_context *context,
+ int status,
+ struct net_buf *iov,
+ void *user_data);
A couple of things: I think "recv" is more intuitive than "read" when it
comes to network operations (as opposed to e.g. file access). Same goes
for "send" vs "write".

I don't think the fact that the net_buf parameter might have extra
fragments after it is enough justification for having it named "iov"
instead of simply "buf". Once fragmentation support is there it should
be the default assumption that any buffer might have a list of trailing
fragments. So at most I'd just mention this in the function documentation.

+/**
+ * @brief Register a receiver to get data from network.
+ *
+ * @details Application uses this to get data from network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is received by the socket. When the IP stack has received data, it then
+ * calls user specified callback and it is callback responsibility to
+ * release the net_buf when the data is no longer needed.
+ * This function will return immediately as it only sets a callback to be
+ * called when new data is received. Application can remove the registered
+ * callback by calling the function with same context and setting cb to NULL.
+ *
+ * @param context Network context
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_readv(struct net_context *context,
+ net_readv_cb_t cb,
+ void *user_data);
To make the purpose of the function clearer I'd rename this to
net_set_recv_cb() or similar.

+/**
+ * @brief Callback that is called when user can send
+ * data to the network.
+ *
+ * @details The first call to this function will set *status to 0 and
+ * bytes_sent to 0. Application can then prepare the data to be sent
+ * in net_buf fragment list. The data to be sent is returned to the
+ * caller of the function. If application does not wish to send anything
+ * it can just return NULL. In this case the caller will deallocate the
+ * iov list. Application should set the *status to <0 to indicate more
+ * detailed reason for the error if NULL is returned.
+ *
+ * For successfully sent UDP data, the IP stack will call this
+ * callback again with status set to 0 and bytes_sent telling how many bytes
+ * were sent. If the UDP data was not sent for some reason, then *status
+ * will have value < 0 and bytes_sent is set to 0.
+ *
+ * For TCP, the callback is called when the network connection has been
+ * established. In this case the *status is 0 and bytes_sent is 0.
+ * If there is a connection timeout, the status code will be -ETIMEDOUT
+ * and bytes_sent is set to 0. Other error codes are also possible in
+ * which case the *status < 0 and bytes_sent will tell how many bytes were
+ * successfully sent. If the *status is set to 0 then bytes_sent will tell
+ * how many bytes were sent to the peer.
+ *
+ * The iov fragment list does not contain data that has been successfully
+ * sent. Also the iov->frags->data of the first data fragment will point to
+ * first byte that has not yet been sent.
If you want to maintain the same buffer list even after sending all data
in some of them (something I don't think is a good idea since you want
to unref and get the bufs back to the pool asap) I'd just set buf->len
of all completed buffers to 0, i.e. the start of remaining data would be
the first buffer in the chain with buf->len > 0. If the idea is to keep
rotating the return parameter back to the next calls input parameter I'd
just go forward in the chain and give a pointer to the first buffer with
data left while having unrefed all the previous ones.

If all the data was sent
+ * successfully, then the first item of iov list will have its frags pointer
+ * set to NULL. Application can send more data if it wishes by returning
+ * a new list of data fragments.
+ *
+ * The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error in stack side
+ * Application can return error code if needed via this pointer.
+ * @param bytes_sent How many bytes were sent.
+ * @param iov List of net_buf that contain data. If this is NULL, then
+ * allocate the buf and fill it with data. If non-NULL, then the protocol
+ * headers are already there and you can append the data.
+ * @param user_data User supplied data
+ *
+ * @return A valid net_buf that needs to be sent,
+ * NULL if user is not able to send anything.
+ */
+typedef struct net_buf *(*net_writev_cb_t)(struct net_context *context,
+ int *status,
+ int bytes_sent,
+ struct net_buf *iov,
+ void *user_data);
I'm not really following what exactly the relationship is of the input
net_buf parameter and the return value of this function. Sounds
unnecessarily complicated to me (the little bit that I did understand).
Why does this function need an input net_buf parameter to start with?

Also, what's the reason this needs to be asynchronous this way? If the
app is responsible for allocating the net_buf can't it just give it
straight to the stack with net_send() or similar, with an optional
callback to notify completion (or failure) of sending the data over the
network?

+ * @brief Reply data to sender.
+ *
+ * @details This is a helper that will help user to reply data to the
+ * sender. Application can use this function to reply data it received
+ * via net_readv().
+ *
+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param iov Data to be sent
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_replyv(struct net_context *context,
+ int32_t timeout,
+ struct net_buf *iov,
+ net_writev_cb_t cb,
+ void *user_data);
This is basically something like the net_send() I mentioned earlier.

Johan


Reg: microkernel and nanokernel fiber & tasks

johnwalker sct <johnwalkersct@...>
 

Guys !! Good day !!
Iam currently Evaluating the zephyr rtos for my project

Appreciate your ideas on the below

I have two radio's ( BLE and Wifi) on my board
My application is to Switch ON radio and do the tx/rx in the available
radio ( BLE or wifi at a single point of time )
Is that a good idea to follow as

For device driver initialization (nanokernel)
================================

1. Do a device init for BLE in nanokernel and write a fiber for rx and
tx in the BLE driver
2. Do a device init for WiFi in nanokernel and write a fiber for rx and
tx in the WiFi driver

For application (microkernel)
=======================

1. Create task for BLE in microkernel
2. Create task for wifi in microkernel
3. Write a main file to call these tasks

Appreciate your ideas for my requirement

Thanks
Walker


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 0

UPDATED JIRA items within last 24 hours: 1
[ZEP-107] Need a consistent way for selecting boards and SOCs in menuconfig
https://jira.zephyrproject.org/browse/ZEP-107


CLOSED JIRA items within last 24 hours: 1
[ZEP-100] (Fixed) Test bug for Gerrit
https://jira.zephyrproject.org/browse/ZEP-100


RESOLVED JIRA items within last 24 hours: 2
[ZEP-204] (Cannot Reproduce) GPIO sample refuses to compile
https://jira.zephyrproject.org/browse/ZEP-204

[ZEP-148] (Fixed) Online documentation for kconfig repeats itself
https://jira.zephyrproject.org/browse/ZEP-148


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1720 : sensor: add support for BMG160 gyroscope
- https://gerrit.zephyrproject.org/r/1719 : nanokernel: Fix nanokernel object timeout recalculation
- https://gerrit.zephyrproject.org/r/1721 : sensor: bmg160: add sample application
- https://gerrit.zephyrproject.org/r/1707 : drivers/interrupt_controller: initialize only NUM_IRQS interrupts
- https://gerrit.zephyrproject.org/r/1713 : Bluetooth: BR/EDR: Fix legacy pairing
- https://gerrit.zephyrproject.org/r/1700 : nanokernel: move C atomic operations to centralized code
- https://gerrit.zephyrproject.org/r/1706 : philosophers: nanokernel: use empty config
- https://gerrit.zephyrproject.org/r/1705 : test_timer: nanokernel: use empty config for all arches
- https://gerrit.zephyrproject.org/r/1704 : test_xip: nanokernel: use common proj.conf
- https://gerrit.zephyrproject.org/r/1703 : test_obj_tracing: nanokernel: use common config
- https://gerrit.zephyrproject.org/r/1702 : linker-tool-gcc: improve readability
- https://gerrit.zephyrproject.org/r/1701 : test_errno: remove unnecessary use of nanokernel private API
- https://gerrit.zephyrproject.org/r/1717 : drivers/nble: Refactor CCC changed logic
- https://gerrit.zephyrproject.org/r/1716 : drivers/nble: Save peer address with CCC write
- https://gerrit.zephyrproject.org/r/1692 : tests: test_slist: Add test for sys_slist_insert
- https://gerrit.zephyrproject.org/r/1691 : misc: Add sys_slist_insert
- https://gerrit.zephyrproject.org/r/1711 : sensor: apds9660: remove explicit GPIO configs
- https://gerrit.zephyrproject.org/r/1710 : samples: gpio: sanitize test and remove obsolete options
- https://gerrit.zephyrproject.org/r/1708 : include/arch/arc: fix memory permissions
- https://gerrit.zephyrproject.org/r/1699 : arch/arc: __start label incorrectly aliased
- https://gerrit.zephyrproject.org/r/1695 : openocd: Upgrade to 0.9

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1584 : Added profiler application and scripts
- https://gerrit.zephyrproject.org/r/1580 : Add support of event logger put/get without sync
- https://gerrit.zephyrproject.org/r/1387 : Bluetooth: gatt: include service api definition proposal
- https://gerrit.zephyrproject.org/r/1648 : net: buf: Add fragmentation API support
- https://gerrit.zephyrproject.org/r/1666 : nios2: basic build, non-functional
- https://gerrit.zephyrproject.org/r/1593 : nanokernel: Add callout API
- https://gerrit.zephyrproject.org/r/1649 : net: buf: Add fragmentation API tests
- https://gerrit.zephyrproject.org/r/1661 : tests: Add unit test for sys_callout API
- https://gerrit.zephyrproject.org/r/1594 : Bluetooth: SMP: Make use of sys_callout API
- https://gerrit.zephyrproject.org/r/1613 : i2c: add device config helpers
- https://gerrit.zephyrproject.org/r/1667 : Makefile.toolchain.zephyr: add nios2 arch
- https://gerrit.zephyrproject.org/r/1616 : samples: mcp9808: support two devices
- https://gerrit.zephyrproject.org/r/1668 : arch/Makefile: simplify
- https://gerrit.zephyrproject.org/r/1379 : microkernel: [un]block tasks on nanokernel objects infrastructure

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1709 : sensors: sample: this testcase is for arduino_101
- https://gerrit.zephyrproject.org/r/1712 : samples: cleanup environmental sensing README file
- https://gerrit.zephyrproject.org/r/1718 : ieee802154: cc2520: Invalid argument should return -EINVAL
- https://gerrit.zephyrproject.org/r/1715 : drivers/nble: Improve debug
- https://gerrit.zephyrproject.org/r/1714 : drivers/nble: Remove unneeded type cast
- https://gerrit.zephyrproject.org/r/1694 : doc: Bluetooth: Create separate development file
- https://gerrit.zephyrproject.org/r/1693 : doc: Bluetooth: General language fixes to the current documentation
- https://gerrit.zephyrproject.org/r/1696 : drivers: stm32: Include errno.h
- https://gerrit.zephyrproject.org/r/1697 : arch: st_stm32: Include errno.h
- https://gerrit.zephyrproject.org/r/1698 : device: Include errno.h
- https://gerrit.zephyrproject.org/r/1684 : sensor: fix bmc150_magn compile error
- https://gerrit.zephyrproject.org/r/1690 : jira: prevent email with 0 changes
- https://gerrit.zephyrproject.org/r/1513 : Bluetooth: Add temporary workaround for MyNewt HCI_LE_Random reliability
- https://gerrit.zephyrproject.org/r/1029 : device: Remove DEV_* codes
- https://gerrit.zephyrproject.org/r/1601 : doc: power_mgmt: Added Power Management documentation
- https://gerrit.zephyrproject.org/r/1681 : ieee802154: Fix returning codes
- https://gerrit.zephyrproject.org/r/1682 : gpio: Fix returning codes
- https://gerrit.zephyrproject.org/r/1655 : newlib: Change location of libraries
- https://gerrit.zephyrproject.org/r/1596 : sensor: migrate all drivers to new SYS_LOG
- https://gerrit.zephyrproject.org/r/1251 : sensor: make runtime configurable attrs continuous
- https://gerrit.zephyrproject.org/r/1575 : sensor: split lsm9ds0_gyro driver
- https://gerrit.zephyrproject.org/r/1341 : sensor: add driver for LSM9DS0 accel and magn
- https://gerrit.zephyrproject.org/r/1574 : sensor: split bmc150_magn driver
- https://gerrit.zephyrproject.org/r/1340 : sensor: add the posibility to fetch one data type
- https://gerrit.zephyrproject.org/r/1278 : sensor: refactor bmc150 and lsm9ds0
- https://gerrit.zephyrproject.org/r/1573 : sensor: rename SENSOR_TYPE_* to SENSOR_VALUE_TYPE_*
- https://gerrit.zephyrproject.org/r/1360 : sensor: fix init driver_api
- https://gerrit.zephyrproject.org/r/1678 : quark_se_devboard: use QMSI drivers
- https://gerrit.zephyrproject.org/r/1683 : doc: Remove references to Bluetooth from Networking
- https://gerrit.zephyrproject.org/r/1679 : arduino 101: use QMSI spi driver


Re: [RFC] net: New API for applications to send and receive data

Vinicius Costa Gomes
 

Hi Jukka,

Jukka Rissanen <jukka.rissanen(a)linux.intel.com> writes:

Signed-off-by: Jukka Rissanen <jukka.rissanen(a)linux.intel.com>
---
Hi,

current network application APIs in Zephyr are synchronous and a
bit of awkward to use in TCP. Because of these things, I propose
couple of new functions that are asynchronous and easier to use
by the application. These APIs require net_buf fragmentation support
that I sent earlier.
At least from Soletta side, what I feel is lacking from the Zephyr
network stack API-wise is this:

- net_writeto(struct net_context *context, struct net_buf *buf,
struct net_addr *to, uint16_t port)

- net_readfrom(struct net_context *context, struct net_buf *buf,
struct net_addr *from, uint16_t *port);

- net_context_add_addr(struct net_context *context,
struct net_addr *local_addr, uint16_t port);

See what Ivan needed to do here:

https://github.com/solettaproject/soletta/blob/master/src/lib/comms/sol-socket-impl-zephyr.c#L260

Cheers,
Jukka


include/net/net_socket.h | 141 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)

diff --git a/include/net/net_socket.h b/include/net/net_socket.h
index 88073b1..2451de3 100644
--- a/include/net/net_socket.h
+++ b/include/net/net_socket.h
@@ -143,6 +143,147 @@ int net_reply(struct net_context *context, struct net_buf *buf);
struct simple_udp_connection *
net_context_get_udp_connection(struct net_context *context);

+/**
+ * @brief Callback that is called when there is something received from
+ * the network.
+ *
+ * @details It is callback responsibility to release the net_buf when the
+ * data is no longer needed. The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error
+ * @param iov List of net_buf that contain data
+ * @param user_data User supplied data
+ */
+typedef void (*net_readv_cb_t)(struct net_context *context,
+ int status,
+ struct net_buf *iov,
+ void *user_data);
+
+/**
+ * @brief Register a receiver to get data from network.
+ *
+ * @details Application uses this to get data from network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is received by the socket. When the IP stack has received data, it then
+ * calls user specified callback and it is callback responsibility to
+ * release the net_buf when the data is no longer needed.
+ * This function will return immediately as it only sets a callback to be
+ * called when new data is received. Application can remove the registered
+ * callback by calling the function with same context and setting cb to NULL.
+ *
+ * @param context Network context
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_readv(struct net_context *context,
+ net_readv_cb_t cb,
+ void *user_data);
+
+/**
+ * @brief Callback that is called when user can send
+ * data to the network.
+ *
+ * @details The first call to this function will set *status to 0 and
+ * bytes_sent to 0. Application can then prepare the data to be sent
+ * in net_buf fragment list. The data to be sent is returned to the
+ * caller of the function. If application does not wish to send anything
+ * it can just return NULL. In this case the caller will deallocate the
+ * iov list. Application should set the *status to <0 to indicate more
+ * detailed reason for the error if NULL is returned.
+ *
+ * For successfully sent UDP data, the IP stack will call this
+ * callback again with status set to 0 and bytes_sent telling how many bytes
+ * were sent. If the UDP data was not sent for some reason, then *status
+ * will have value < 0 and bytes_sent is set to 0.
+ *
+ * For TCP, the callback is called when the network connection has been
+ * established. In this case the *status is 0 and bytes_sent is 0.
+ * If there is a connection timeout, the status code will be -ETIMEDOUT
+ * and bytes_sent is set to 0. Other error codes are also possible in
+ * which case the *status < 0 and bytes_sent will tell how many bytes were
+ * successfully sent. If the *status is set to 0 then bytes_sent will tell
+ * how many bytes were sent to the peer.
+ *
+ * The iov fragment list does not contain data that has been successfully
+ * sent. Also the iov->frags->data of the first data fragment will point to
+ * first byte that has not yet been sent. If all the data was sent
+ * successfully, then the first item of iov list will have its frags pointer
+ * set to NULL. Application can send more data if it wishes by returning
+ * a new list of data fragments.
+ *
+ * The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error in stack side
+ * Application can return error code if needed via this pointer.
+ * @param bytes_sent How many bytes were sent.
+ * @param iov List of net_buf that contain data. If this is NULL, then
+ * allocate the buf and fill it with data. If non-NULL, then the protocol
+ * headers are already there and you can append the data.
+ * @param user_data User supplied data
+ *
+ * @return A valid net_buf that needs to be sent,
+ * NULL if user is not able to send anything.
+ */
+typedef struct net_buf *(*net_writev_cb_t)(struct net_context *context,
+ int *status,
+ int bytes_sent,
+ struct net_buf *iov,
+ void *user_data);
+
+/**
+ * @brief Send data to network.
+ *
+ * @details Application uses this to send data to a network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is ready to be sent. The function will return immediately, the timeout
+ * is only used when calling the user callback. For UDP, the timeout is
+ * ignored. For TCP the callback is called after the TCP connection is
+ * established and user is able to send data, or if there is an error
+ * creating a connection or if the connection timeouts.
+ *
+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_writev(struct net_context *context,
+ int32_t timeout,
+ net_writev_cb_t cb,
+ void *user_data);
+
+/**
+ * @brief Reply data to sender.
+ *
+ * @details This is a helper that will help user to reply data to the
+ * sender. Application can use this function to reply data it received
+ * via net_readv().
+ *
+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param iov Data to be sent
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_replyv(struct net_context *context,
+ int32_t timeout,
+ struct net_buf *iov,
+ net_writev_cb_t cb,
+ void *user_data);
+
#ifdef __cplusplus
}
#endif
--
2.5.5

Cheers,
--
Vinicius


Re: [RFC] net: New API for applications to send and receive data

Iván Briano <ivan.briano at intel.com...>
 

On Wed, 27 Apr 2016 11:59:50 +0300, Jukka Rissanen wrote:
Signed-off-by: Jukka Rissanen <jukka.rissanen(a)linux.intel.com>
---
Hi,

current network application APIs in Zephyr are synchronous and a
bit of awkward to use in TCP. Because of these things, I propose
couple of new functions that are asynchronous and easier to use
by the application. These APIs require net_buf fragmentation support
that I sent earlier.

Cheers,
Jukka


include/net/net_socket.h | 141 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)

diff --git a/include/net/net_socket.h b/include/net/net_socket.h
index 88073b1..2451de3 100644
--- a/include/net/net_socket.h
+++ b/include/net/net_socket.h
@@ -143,6 +143,147 @@ int net_reply(struct net_context *context, struct net_buf *buf);
struct simple_udp_connection *
net_context_get_udp_connection(struct net_context *context);

+/**
+ * @brief Callback that is called when there is something received from
+ * the network.
+ *
+ * @details It is callback responsibility to release the net_buf when the
+ * data is no longer needed. The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error
+ * @param iov List of net_buf that contain data
+ * @param user_data User supplied data
+ */
+typedef void (*net_readv_cb_t)(struct net_context *context,
+ int status,
+ struct net_buf *iov,
+ void *user_data);
I receive a list of net_buf, based on what criteria? A list of packets
or a single packet split in several buffers? If the latter, then you are
relegating to the application developer the job of putting it all
together, which in many cases will be required. Unless we expect that
every single higher level protocol will work with non-continuous chunks
of memory.

+
+/**
+ * @brief Register a receiver to get data from network.
+ *
+ * @details Application uses this to get data from network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is received by the socket. When the IP stack has received data, it then
+ * calls user specified callback and it is callback responsibility to
+ * release the net_buf when the data is no longer needed.
+ * This function will return immediately as it only sets a callback to be
+ * called when new data is received. Application can remove the registered
+ * callback by calling the function with same context and setting cb to NULL.
+ *
+ * @param context Network context
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_readv(struct net_context *context,
+ net_readv_cb_t cb,
+ void *user_data);
+
+/**
+ * @brief Callback that is called when user can send
+ * data to the network.
+ *
+ * @details The first call to this function will set *status to 0 and
+ * bytes_sent to 0. Application can then prepare the data to be sent
+ * in net_buf fragment list. The data to be sent is returned to the
+ * caller of the function. If application does not wish to send anything
+ * it can just return NULL. In this case the caller will deallocate the
+ * iov list. Application should set the *status to <0 to indicate more
+ * detailed reason for the error if NULL is returned.
+ *
+ * For successfully sent UDP data, the IP stack will call this
+ * callback again with status set to 0 and bytes_sent telling how many bytes
+ * were sent. If the UDP data was not sent for some reason, then *status
+ * will have value < 0 and bytes_sent is set to 0.
+ *
+ * For TCP, the callback is called when the network connection has been
+ * established. In this case the *status is 0 and bytes_sent is 0.
+ * If there is a connection timeout, the status code will be -ETIMEDOUT
+ * and bytes_sent is set to 0. Other error codes are also possible in
+ * which case the *status < 0 and bytes_sent will tell how many bytes were
+ * successfully sent. If the *status is set to 0 then bytes_sent will tell
+ * how many bytes were sent to the peer.
+ *
+ * The iov fragment list does not contain data that has been successfully
+ * sent. Also the iov->frags->data of the first data fragment will point to
+ * first byte that has not yet been sent. If all the data was sent
+ * successfully, then the first item of iov list will have its frags pointer
+ * set to NULL. Application can send more data if it wishes by returning
+ * a new list of data fragments.
+ *
+ * The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error in stack side
+ * Application can return error code if needed via this pointer.
+ * @param bytes_sent How many bytes were sent.
+ * @param iov List of net_buf that contain data. If this is NULL, then
+ * allocate the buf and fill it with data. If non-NULL, then the protocol
+ * headers are already there and you can append the data.
+ * @param user_data User supplied data
+ *
+ * @return A valid net_buf that needs to be sent,
+ * NULL if user is not able to send anything.
+ */
+typedef struct net_buf *(*net_writev_cb_t)(struct net_context *context,
+ int *status,
+ int bytes_sent,
+ struct net_buf *iov,
+ void *user_data);
So the way to use this is:
- I have data to send, I call net_writev() and set my callback.
- When data can be sent, callback is called, *status and bytes_sent = 0
- I allocate a net_buf, put my data in it, and return it.
* What's the iov received here? Only for error cases or the callback
can be called multiple times to send the remaining data? In that
case, the idea is that I receive a list of unsent data that I need
to return and that's it?
- When all data was sent, the callback is called again with *status 0
and bytes_sent sent to the total of bytes sent... since the last time
the function was called? Since the first?

The thing with the fragment list, I'm understanding is meant to work as
an iovec, so let's say I have a CoAP server that wants to notify three
different clients of a change in a resource, it would make sense to have
a single buffer with the payload and change the one with the header. If
I understand this correctly, when data was sent successfully, I will not
have access to the net_buf with the payload anymore, so I would need to
recreate it, correct? In this case, there's no gain (and maybe even a
little loss) in doing a list of fragments, when I can just use a single
buffer and copy both header and payload to it.

+
+/**
+ * @brief Send data to network.
+ *
+ * @details Application uses this to send data to a network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is ready to be sent. The function will return immediately, the timeout
+ * is only used when calling the user callback. For UDP, the timeout is
+ * ignored. For TCP the callback is called after the TCP connection is
+ * established and user is able to send data, or if there is an error
+ * creating a connection or if the connection timeouts.
+ *
This means that every time I call net_writev(), the TCP connection is
established? Or is that only the first time? If it's only the first, why
not add a connect() function? And if it's established every time, what's
the point of that?

+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_writev(struct net_context *context,
+ int32_t timeout,
+ net_writev_cb_t cb,
+ void *user_data);
+
+/**
+ * @brief Reply data to sender.
+ *
+ * @details This is a helper that will help user to reply data to the
+ * sender. Application can use this function to reply data it received
+ * via net_readv().
+ *
+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param iov Data to be sent
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_replyv(struct net_context *context,
+ int32_t timeout,
+ struct net_buf *iov,
+ net_writev_cb_t cb,
+ void *user_data);
+
Is there really no way to get rid of this? Why can't we just have a
'send' function that works for all cases? If the problem is getting the
address to send to, just add a helper function to put this in the
net_buf before sending.

#ifdef __cplusplus
}
#endif
--
2.5.5


Re: [RFC] net: New API for applications to send and receive data

Luiz Augusto von Dentz
 

Hi Jukka,

On Wed, Apr 27, 2016 at 11:59 AM, Jukka Rissanen
<jukka.rissanen(a)linux.intel.com> wrote:
Signed-off-by: Jukka Rissanen <jukka.rissanen(a)linux.intel.com>
---
Hi,

current network application APIs in Zephyr are synchronous and a
bit of awkward to use in TCP. Because of these things, I propose
couple of new functions that are asynchronous and easier to use
by the application. These APIs require net_buf fragmentation support
that I sent earlier.

Cheers,
Jukka


include/net/net_socket.h | 141 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)

diff --git a/include/net/net_socket.h b/include/net/net_socket.h
index 88073b1..2451de3 100644
--- a/include/net/net_socket.h
+++ b/include/net/net_socket.h
Perhaps it should be name io instead of socket since this is not a BSD
socket API, and I would drop the net_ prefix as that is already
implicit from the parent directory. Or perhaps have the API using
socket version e.g: send*/recv*, but Im afraid a familiar socket API
would require queuing and some way of polling the context so I don't
know if it is doable.

@@ -143,6 +143,147 @@ int net_reply(struct net_context *context, struct net_buf *buf);
struct simple_udp_connection *
net_context_get_udp_connection(struct net_context *context);

+/**
+ * @brief Callback that is called when there is something received from
+ * the network.
+ *
+ * @details It is callback responsibility to release the net_buf when the
+ * data is no longer needed. The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error
+ * @param iov List of net_buf that contain data
+ * @param user_data User supplied data
+ */
+typedef void (*net_readv_cb_t)(struct net_context *context,
+ int status,
+ struct net_buf *iov,
+ void *user_data);
+
+/**
+ * @brief Register a receiver to get data from network.
+ *
+ * @details Application uses this to get data from network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is received by the socket. When the IP stack has received data, it then
+ * calls user specified callback and it is callback responsibility to
+ * release the net_buf when the data is no longer needed.
+ * This function will return immediately as it only sets a callback to be
+ * called when new data is received. Application can remove the registered
+ * callback by calling the function with same context and setting cb to NULL.
+ *
+ * @param context Network context
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_readv(struct net_context *context,
+ net_readv_cb_t cb,
+ void *user_data);

+/**
+ * @brief Callback that is called when user can send
+ * data to the network.
+ *
+ * @details The first call to this function will set *status to 0 and
+ * bytes_sent to 0. Application can then prepare the data to be sent
+ * in net_buf fragment list. The data to be sent is returned to the
+ * caller of the function. If application does not wish to send anything
+ * it can just return NULL. In this case the caller will deallocate the
+ * iov list. Application should set the *status to <0 to indicate more
+ * detailed reason for the error if NULL is returned.
+ *
+ * For successfully sent UDP data, the IP stack will call this
+ * callback again with status set to 0 and bytes_sent telling how many bytes
+ * were sent. If the UDP data was not sent for some reason, then *status
+ * will have value < 0 and bytes_sent is set to 0.
+ *
+ * For TCP, the callback is called when the network connection has been
+ * established. In this case the *status is 0 and bytes_sent is 0.
+ * If there is a connection timeout, the status code will be -ETIMEDOUT
+ * and bytes_sent is set to 0. Other error codes are also possible in
+ * which case the *status < 0 and bytes_sent will tell how many bytes were
+ * successfully sent. If the *status is set to 0 then bytes_sent will tell
+ * how many bytes were sent to the peer.
+ *
+ * The iov fragment list does not contain data that has been successfully
+ * sent. Also the iov->frags->data of the first data fragment will point to
+ * first byte that has not yet been sent. If all the data was sent
+ * successfully, then the first item of iov list will have its frags pointer
+ * set to NULL. Application can send more data if it wishes by returning
+ * a new list of data fragments.
+ *
+ * The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error in stack side
+ * Application can return error code if needed via this pointer.
+ * @param bytes_sent How many bytes were sent.
+ * @param iov List of net_buf that contain data. If this is NULL, then
+ * allocate the buf and fill it with data. If non-NULL, then the protocol
+ * headers are already there and you can append the data.
+ * @param user_data User supplied data
+ *
+ * @return A valid net_buf that needs to be sent,
+ * NULL if user is not able to send anything.
+ */
+typedef struct net_buf *(*net_writev_cb_t)(struct net_context *context,
+ int *status,
+ int bytes_sent,
+ struct net_buf *iov,
+ void *user_data);
+
+/**
+ * @brief Send data to network.
+ *
+ * @details Application uses this to send data to a network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is ready to be sent. The function will return immediately, the timeout
+ * is only used when calling the user callback. For UDP, the timeout is
+ * ignored. For TCP the callback is called after the TCP connection is
+ * established and user is able to send data, or if there is an error
+ * creating a connection or if the connection timeouts.
+ *
+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_writev(struct net_context *context,
+ int32_t timeout,
+ net_writev_cb_t cb,
+ void *user_data);
+
+/**
+ * @brief Reply data to sender.
+ *
+ * @details This is a helper that will help user to reply data to the
+ * sender. Application can use this function to reply data it received
+ * via net_readv().
+ *
+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param iov Data to be sent
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_replyv(struct net_context *context,
+ int32_t timeout,
+ struct net_buf *iov,
+ net_writev_cb_t cb,
+ void *user_data);
+
#ifdef __cplusplus
}
#endif
--
2.5.5


--
Luiz Augusto von Dentz


Re: [RFC PATCH 3/6] i2c: add device config helpers

Dobre, Antonel G <antonel.g.dobre@...>
 

Hello

I am in charge of development for the configuration tool mentioned by Vlad.

Our tool aims to help developers both for Zephyr and Linux manage device configurations on build time and ACPI, respectively. We plan on creating a small high-level description language in which developers state what components they need on what board, and together with some information like GPIO pin interrupts, bus addresses and/or ACPI properties we either create configuration code for Zephyr ( in the manner Vlad is describing in his patches ) or ACPI tables for Linux.

This tool will be made open source and available to everyone as soon as we have integrated all the features previously mentioned.

Tony Dobre

-----Original Message-----
From: Dogaru, Vlad
Sent: Tuesday, April 26, 2016 5:52 PM
To: Tomasz Bursztyka <tomasz.bursztyka(a)linux.intel.com>; Dobre, Antonel G <antonel.g.dobre(a)intel.com>
Cc: devel(a)lists.zephyrproject.org
Subject: Re: [devel] Re: Re: Re: [RFC PATCH 3/6] i2c: add device config helpers

On Mon, Apr 25, 2016 at 01:59:42PM +0200, Tomasz Bursztyka wrote:
Hi Vlad,

The configuration tool needs to generate config structures (see
devices.c in patch 6/6). These structures are device specific, but
the tool should be as generic as possible. Hard coding the struct
member name to "i2c_client" helps achieve that.

Thus, assuming the macros are correctly used, the config tool needs
only information such as "this device is connected to master I2C0,
address 0x76", to generate "I2C_CLIENT(I2C0, 0x76)". Allowing the
name to change would be an extra variable.
Ok, so it would be really great know a lot more about this tool.
Adding Tony, he can explain more about the tool.

Thanks,
Vlad


Re: [RFC PATCH 2/6] sensor: add device config helpers

Vlad Dogaru <vlad.dogaru@...>
 

On Tue, Apr 26, 2016 at 01:06:25PM -0400, Benjamin Walsh wrote:
On Mon, Apr 25, 2016 at 01:58:12PM +0300, Vlad Dogaru wrote:
On Mon, Apr 25, 2016 at 12:59:57PM +0200, Tomasz Bursztyka wrote:
Hi Vlad,

Define some configuration structures and macros that can be used in
device configuration. These usage scenarios are as follows:

* device drivers will use DECLARE_* macros in their device
configuration structures and GET_* macros in the init functions;

* application code will use SENSOR_TRIG_* to fill in the device
configuration structures.

We also define a convenient wrapper for starting a new fiber based on a
given configuration.

Change-Id: I3a897999175b14a4cd1111da4c26434741294e52
Signed-off-by: Vlad Dogaru <vlad.dogaru(a)intel.com>
---
include/sensor.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

diff --git a/include/sensor.h b/include/sensor.h
index 918326a..8312b5a 100644
--- a/include/sensor.h
+++ b/include/sensor.h
@@ -190,6 +190,18 @@ enum sensor_attribute {
SENSOR_ATTR_CALIB_TARGET,
};
+enum sensor_trigger_mode {
+ SENSOR_TRIG_MODE_NONE,
+ SENSOR_TRIG_MODE_OWN,
+ SENSOR_TRIG_MODE_GLOBAL,
+};
Since it's part of public sensor API, rename it to: struct
sensor_fiber_config
If it stays here, then yeah, it makes sense to prefix it with "sensor_".

The question is if other subsystems would benefit from such a structure.
As it's defined now, there is nothing sensor specific about it or the
helper function that starts a fiber. Should I move them to a system
header so others can use them?
Were you envisionning having this as a "device" type of fiber, or were
you thinking having this as an even more generic concept ?
I've left the rest of the structure and the helper that uses it below
and trimmed the rest of the code for clarity. There is nothing about
these that is sensor- or device-specific (well, besides the name, but
that I will change).

The caller can still supply their own entry point and arguments. So it
is a generic concept. I will post a patch for it.

+
+struct fiber_config {
+ void *fiber_stack;
+ unsigned int fiber_stack_size;
+ unsigned int fiber_priority;
+};

+static inline nano_thread_id_t
+sensor_fiber_start(const struct fiber_config *cfg,
+ nano_fiber_entry_t entry, int arg1, int arg2,
+ unsigned options)
+{
+ return fiber_start(cfg->fiber_stack, cfg->fiber_stack_size,
+ entry, arg1, arg2, cfg->fiber_priority,
+ options);
+}
Thanks,
Vlad


[RFC] net: New API for applications to send and receive data

Jukka Rissanen
 

Signed-off-by: Jukka Rissanen <jukka.rissanen(a)linux.intel.com>
---
Hi,

current network application APIs in Zephyr are synchronous and a
bit of awkward to use in TCP. Because of these things, I propose
couple of new functions that are asynchronous and easier to use
by the application. These APIs require net_buf fragmentation support
that I sent earlier.

Cheers,
Jukka


include/net/net_socket.h | 141 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)

diff --git a/include/net/net_socket.h b/include/net/net_socket.h
index 88073b1..2451de3 100644
--- a/include/net/net_socket.h
+++ b/include/net/net_socket.h
@@ -143,6 +143,147 @@ int net_reply(struct net_context *context, struct net_buf *buf);
struct simple_udp_connection *
net_context_get_udp_connection(struct net_context *context);

+/**
+ * @brief Callback that is called when there is something received from
+ * the network.
+ *
+ * @details It is callback responsibility to release the net_buf when the
+ * data is no longer needed. The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error
+ * @param iov List of net_buf that contain data
+ * @param user_data User supplied data
+ */
+typedef void (*net_readv_cb_t)(struct net_context *context,
+ int status,
+ struct net_buf *iov,
+ void *user_data);
+
+/**
+ * @brief Register a receiver to get data from network.
+ *
+ * @details Application uses this to get data from network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is received by the socket. When the IP stack has received data, it then
+ * calls user specified callback and it is callback responsibility to
+ * release the net_buf when the data is no longer needed.
+ * This function will return immediately as it only sets a callback to be
+ * called when new data is received. Application can remove the registered
+ * callback by calling the function with same context and setting cb to NULL.
+ *
+ * @param context Network context
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_readv(struct net_context *context,
+ net_readv_cb_t cb,
+ void *user_data);
+
+/**
+ * @brief Callback that is called when user can send
+ * data to the network.
+ *
+ * @details The first call to this function will set *status to 0 and
+ * bytes_sent to 0. Application can then prepare the data to be sent
+ * in net_buf fragment list. The data to be sent is returned to the
+ * caller of the function. If application does not wish to send anything
+ * it can just return NULL. In this case the caller will deallocate the
+ * iov list. Application should set the *status to <0 to indicate more
+ * detailed reason for the error if NULL is returned.
+ *
+ * For successfully sent UDP data, the IP stack will call this
+ * callback again with status set to 0 and bytes_sent telling how many bytes
+ * were sent. If the UDP data was not sent for some reason, then *status
+ * will have value < 0 and bytes_sent is set to 0.
+ *
+ * For TCP, the callback is called when the network connection has been
+ * established. In this case the *status is 0 and bytes_sent is 0.
+ * If there is a connection timeout, the status code will be -ETIMEDOUT
+ * and bytes_sent is set to 0. Other error codes are also possible in
+ * which case the *status < 0 and bytes_sent will tell how many bytes were
+ * successfully sent. If the *status is set to 0 then bytes_sent will tell
+ * how many bytes were sent to the peer.
+ *
+ * The iov fragment list does not contain data that has been successfully
+ * sent. Also the iov->frags->data of the first data fragment will point to
+ * first byte that has not yet been sent. If all the data was sent
+ * successfully, then the first item of iov list will have its frags pointer
+ * set to NULL. Application can send more data if it wishes by returning
+ * a new list of data fragments.
+ *
+ * The callback is called in fiber context.
+ *
+ * @param context Network context
+ * @param status 0 if ok, <0 if there is an error in stack side
+ * Application can return error code if needed via this pointer.
+ * @param bytes_sent How many bytes were sent.
+ * @param iov List of net_buf that contain data. If this is NULL, then
+ * allocate the buf and fill it with data. If non-NULL, then the protocol
+ * headers are already there and you can append the data.
+ * @param user_data User supplied data
+ *
+ * @return A valid net_buf that needs to be sent,
+ * NULL if user is not able to send anything.
+ */
+typedef struct net_buf *(*net_writev_cb_t)(struct net_context *context,
+ int *status,
+ int bytes_sent,
+ struct net_buf *iov,
+ void *user_data);
+
+/**
+ * @brief Send data to network.
+ *
+ * @details Application uses this to send data to a network connection.
+ * Caller needs to specify a callback function that is called when data
+ * is ready to be sent. The function will return immediately, the timeout
+ * is only used when calling the user callback. For UDP, the timeout is
+ * ignored. For TCP the callback is called after the TCP connection is
+ * established and user is able to send data, or if there is an error
+ * creating a connection or if the connection timeouts.
+ *
+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_writev(struct net_context *context,
+ int32_t timeout,
+ net_writev_cb_t cb,
+ void *user_data);
+
+/**
+ * @brief Reply data to sender.
+ *
+ * @details This is a helper that will help user to reply data to the
+ * sender. Application can use this function to reply data it received
+ * via net_readv().
+ *
+ * @param context Network context
+ * @param timeout How long to wait until user can send data. This is only
+ * used in TCP.
+ * @param iov Data to be sent
+ * @param cb User supplied callback function
+ * @param user_data User supplied data
+ *
+ * @return 0 if cb registration was ok, <0 otherwise
+ */
+int net_replyv(struct net_context *context,
+ int32_t timeout,
+ struct net_buf *iov,
+ net_writev_cb_t cb,
+ void *user_data);
+
#ifdef __cplusplus
}
#endif
--
2.5.5


Zephyr 1.3.0-rc1 tagged

Perez Hernandez, Javier B <javier.b.perez.hernandez@...>
 

Hi,

Zephyr v1.3.0-rc1 has been tagged.
The merge window for new features is now closed. The target date for the 1.3.0 release is end of this week.
Below is the list of changes since v1.2.0

Regards
Javier B. Perez



Anas Nashif (66):
      openocd: make openocd variables overridable from env
      doc: move device driver to a new section
      doc: create subsystem section
      doc: Fixed structure in collab guide
      docs: remove notes from bluetooth document
      doc: fix wording in device documentation
      doc: make naming conventions apply to none kernel functions
      docs: Getting Started overhaul
      doc: remove networking configuration section
      doc: remove usage of sudo and reduce notes
      doc: move code contribution guidelines one level up
      doc: merge coding conventions into one document
      doc: link in device model APIs
      Bluetooth: include errno.h
      pinmux: include errno.h
      doc: process tinycrypt headers with doxygen
      doc: remove collaboration guides
      arduino_101: speed up loading of firmware
      stm32: rename CONFIG_SOC_STM32 -> CONFIG_SOC_FAMILY_STM32
      stm32: rename SOC_STM32F1X -> SOC_SERIES_STM32F1X
      kinetis: reorganise soc directory using soc family
      stm32: reorganise soc directory and use family/series
      soc: introduce SoC families and series
      new SoC naming convention
      checkpatch: warn on COMPLEX_MACRO and MULTISTATEMENT_MACRO_USE_DO_WHILE
      fixed inclusion of limits.h when building with newlib
      samples: ipm: reset kernel binary name to zephyr
      doc: show information about documentation current version
      soc: arm: add Makefiles one level up
      Bluetooth: add drivers to include path
      drivers: add qmsi files for Quark MCUs
      qmsi: rtc: use built-in qmsi driver
      qmsi: watchdog: use built-in qmsi driver
      qmsi: i2c: use built-in qmsi driver
      pwm: unify driver names
      spi: use global init priority
      qmsi: pwm: use built-in qmsi driver
      qmsi: aio: use built-in qmsi driver
      aio: rename sample name and make it generic
      qmsi: aon_counters: use built-in qmsi driver
      samples: power: use string for driver name
      nble: Use string name for GPIO driver
      qmsi: gpio: use built-in qmsi driver
      qmsi: adc: use built-in qmsi driver
      qmsi: uart: use built-in qmsi driver
      qmsi: flash: use built-in qmsi driver
      qmsi: spi: fixed warning due to const paramter in API call
      qmsi: spi: use built-in qmsi driver
      qmsi: pinmux: use built-in qmsi driver
      qmsi: use QMSI_LIBRARY instead of QMSI_DRIVERS
      quark_se: quark_d2000: remove all defines that now come from qmsi
      quark_d2000: remove unused code
      doc: index config variable only once
      toolchain: move iamcu output format/arch to SoC
      aio: build only when driver is configured in
      i2c: use I2C_X nameing instead of I2CX
      grove: use default i2c device set in Kconfig
      arc: make SRAM/DCCM values configurable
      build: generate error if board is not found
      doc: fix typo IMACU -> IAMCU
      qmsi: gpio: add initialisation priority for driver
      gpio: rename device name for AON GPIO
      sx9500: remove explicit definitions for GPIO/I2C
      samples: philosophers: reduce stack size used
      samples: synchronization: reduce stack size used
      Zephyr 1.3.0-rc1

Andrei Emeltchenko (29):
      samples/nble: Remove default driver debug for samples
      drivers/nble: Implement GATT read Characteristic Presentation Format
      quark_se_devboard: Enable NBLE for quark_se_devboard in Kconfig
      quark_se_devboard: Configure UART0 for quark_se_devboard
      ia32: Allow to connect Nordic chip to qemu
      drivers/nble: Refactor Nordic BLE chip enable functions
      drivers/nble: Update RPC to Nordic firmware 0404 version
      drivers/nble: Fix typo in compatible_firmware name
      drivers/nble: Move Nordic Bluetooth LE driver inside drivers/bluetooth
      Bluetooth: Add option for PM with Nordic BLE chip
      drivers/nble: Refactor PM code to make it reusable
      quark_se_devboard: Remove UART default name from soc config
      Bluetooth: Enable Nordic BLE chip using PM helpers
      arduino_101: Add default Bluetooth UART configurations
      drivers/nble: Correct auth configuration for No Input / Output
      drivers/nble: Update RPC to Nordic BLE Module
      drivers/nble: Implement multiple read in bt_gatt_read
      drivers/nble: Fix spelling typo
      arduino_101: Do not duplicate GPIO select
      quark_se_devboard: Do not select GPIO
      drivers/nble: Implement read multiple response
      arduino: Remove Kconfig warnings rearranging GPIO selection
      Bluetooth: Fix typo tupe to type
      drivers/nble: Update RPC to 0422 revision
      drivers/nble: Cleanup Nordic RPC code
      quark_se_devboard: Enable PM for the board
      quark_se_devboard: Add configuration for nimble HCI stack
      arduino_101: Correct UART name configuration
      drivers/nble: Update Nordic RPC to 0425

Andrew Boie (7):
      sanitycheck: be smarter about scanning for test cases
      sanitycheck: fix test names to be same as before
      x86.ini: increase arduino_101 priority
      microkernel: deprecate task IRQs
      nanokernel: deprecate dynamic IRQs
      gcc: add __deprecated for shortened __attribute__((deprecated))
      headers: use __deprecated

Arkadiusz Lichwa (14):
      Bluetooth: Fix not using endianess helper in LE L2CAP conn req
      Bluetooth: Rename bt_l2cap_fixed_chan_register()
      Bluetooth: BR/EDR: Add register routine for L2CAP fixed channel
      Bluetooth: BR/EDR: Refactor bt_l2cap_connected handler
      Bluetooth: BR/EDR: Get proper L2CAP CID limits
      Bluetooth: BR/EDR: Make available L2CAP signal channel
      Bluetooth: BR/EDR: Rename pair method field
      Bluetooth: BR/EDR: Refactor internals of 'Cancel' authentication API
      Bluetooth: BR/EDR: Move up code in conn.c
      Bluetooth: L2CAP: l2cap_send_reject() can use BR/EDR L2CAP SIG channel
      Bluetooth: L2CAP: l2cap_chan_get() can get BR/EDR L2CAP SIG channel
      Bluetooth: BR/EDR: Initiate authentication
      Bluetooth: BR/EDR: Notify about pairing while JustWorks
      Bluetooth: BR/EDR: Initiate encryption on link

Baohong Liu (3):
      samples: A test app for spi flash
      drivers: Quark flash support
      samples: Use consistent file naming for project config file

Benjamin Walsh (10):
      gcc: add __weak for shorter __attribute__((__weak__))
      console: add hook for debug server to handle outgoing characters
      x86: add debug hook in _NanoFatalErrorHandler()
      libc: add strncat() to minimal libc
      debug: fit Kconfig lines in 80 columns
      debug: add missing MEM_SAFE dependency
      debug/x86: add runtime info needed by target debuggers
      debug: add target GDB server
      x86/debug: GDB server needs to handle some exceptions
      doc: add architecture porting guide

Bogdan Davidoaia (10):
      sensors: fix coding style regarding max line length
      samples: add environmental sensing sample for Arduino 101
      sensors: use SENSOR_G constant in all accelerometer drivers
      sensors: bma280: fix slope threshold measurement unit
      sensors: add driver for TMP007 infrared thermopile sensor
      sensors: bma280: compute accel scales based on data width
      sensors: bma280: fix accel data sample calculation
      sensors: bma280: add support for BMC150 accelerometer
      i2c: add register access API
      i2c: fix i2c_reg_update_byte

Dan Kalowsky (2):
      docs: adding details for the D2000 board
      boards: nucleo: Adding flash support

Daniel Leung (52):
      tests: enable pinmux build tests
      gpio/dw: remove kconfigs that are SoC specific
      sanitycheck: fix initlevel section being mentioned twice
      ethernet/dw: remove kconfigs that are SoC specific
      sanitycheck: parallelize binary size calculations
      sanitycheck: add ability to use arbitrary report for comparison
      pwm/pca_9685: move driver_api assignment later
      gpio/pcal_9535a: move driver_api assignment later
      uart/nsim: fixed missing driver_api assignment
      spi/intel: move driver_api assignment later
      device_get_binding() returns NULL if driver_api is not set
      serial/uart.h: no need to check driver_api being NULL
      sanitycheck: align output for easier visual comparison
      flash/spi_flash_w25qxxdv: do not set driver_api if init fails
      doc: counter should be under device driver
      device: add macro to assign driver_api at compile time
      pinmux/dev: convert to use DEVICE_AND_API_INIT()
      clock_control/quark_se: convert to use DEVICE_AND_API_INIT()
      serial/uart_ns16550: convert to use DEVICE_AND_API_INIT()
      gpio/dw: convert to use DEVICE_AND_API_INIT()
      i2c/dw: convert to use DEVICE_AND_API_INIT()
      i2c/quark_se_ss: convert to use DEVICE_AND_API_INIT()
      adc/dw: convert to use DEVICE_AND_API_INIT()
      pwm/dw: convert to use DEVICE_AND_API_INIT()
      spi/dw: convert to use DEVICE_AND_API_INIT()
      rtc/dw: convert to use DEVICE_AND_API_INIT()
      watchdog/dw: convert to use DEVICE_AND_API_INIT()
      gpio/k64: convert to use DEVICE_AND_API_INIT()
      serial/k20: convert to use DEVICE_AND_API_INIT()
      pwm/k64_ftm: convert to use DEVICE_AND_API_INIT()
      spi/k64: convert to use DEVICE_AND_API_INIT()
      uart/atmel_sam3: convert to use DEVICE_AND_API_INIT()
      i2c/atmel_sam3: convert to use DEVICE_AND_API_INIT()
      gpio/atmel_sam3: convert to use DEVICE_AND_API_INIT()
      clock_control/stm32f10x: convert to use DEVICE_AND_API_INIT()
      gpio/stm32: convert to use DEVICE_AND_API_INIT()
      serial/uart_stm32: convert to use DEVICE_AND_API_INIT()
      watchdog/iwdg_stm32: convert to use DEVICE_AND_API_INIT()
      serial/stellaris: convert to use DEVICE_AND_API_INIT()
      ipm: convert to use DEVICE_AND_API_INIT()
      doc: pwm: remove extra function param from comment
      doc: microkernel/memory_pool: fix parameter reference tag
      doc: clock_control/stm32f1: Fix @file tag
      doc: include/misc/slist: Fix @file tag
      gitignore: Fix doxygen generated directory names
      doc: kernel_event_logger: fix complain about @defgroup
      doc: irq.h: fix mismatched parameter names in comment
      doc: misc/slist: fixed unsupported xml/html tag warnings
      doc: device.h: hide DEV_* from public documentation
      grove/lcd_rgb: assign magic number to driver_api
      i2c/quark_se_ss: fix RX request pause conditions
      i2c/quark_se_ss: make structs and functions const and static

Dmitriy Korovkin (2):
      kernel: Make idle task sleep
      galileo: Enable PCI enumeration

Flavio Santes (1):
      wdt: update sample code

Gerardo Aceves (1):
      doc: Edit microkernel API links

Grzegorz Kolodziejczyk (7):
      drivers/nble: Add support to bt_gatt_attr_next
      Bluetooth: tester: Use bt enable cb to indicate cmd rsp success
      Bluetooth: drivers/nble: Fix returning included service handle
      Bluetooth: tester: Update server commands with sequence params
      Bluetooth: Remove redundant returns from switch
      Bluetooth: tester: Add support for seqence gatt database
      quark_se_devboard: Configure default UART for UART_PIPE

Javier B Perez (2):
      doc: sphinx conf: use env var in sphinx doc version
      doc: collaboration: code: gerrit commit message JIRA key

Jeremie Garcia (1):
      net: fix uip_udp_conn leak

Jithu Joseph (2):
      power_mgmt: APIs for devices to signal busy
      power_mgmt: Sample usage of device_xxx__busy() APIs

Johan Hedberg (45):
      Bluetooth: Shorten set_adv_parameters to set_adv_param
      Bluetooth: Remove unnecessary double check for CONFIG_BLUETOOTH_CONN
      Bluetooth: Rework local address tracking
      Bluetooth: Add skeleton for persistent storage API
      Bluetooth: Add support for reading local address from storage
      Bluetooth: Export is_bonded through hci_core.c
      Bluetooth: Introduce SMP helper to generate RPAs
      Bluetooth: Add Privacy Feature support
      Bluetooth: Use bt_addr_t inside bt_addr_le_t
      Bluetooth: Don't update random address unnecessarily
      Bluetooth: Export bt_storage inside the stack
      Bluetooth: Rename bt_register_storage to bt_storage_register
      Bluetooth: Add stub for bt_storage_clear()
      Bluetooth: drivers/nble: Require callback for bt_enable()
      Bluetooth: Fix BLUETOOTH_NRF51_PM Kconfig definition
      boards/arduino_101: defconfig: Enable nRF51 PM if NBLE is selected
      Bluetooth: Refactor nRF51 API
      Bluetooth: Kconfig: don't hardcode "UART_0"
      Bluetooth: drivers/nble: Add Kconfig option for conn.c
      arduino_101: defconfig: Limit UART defaults for Bluetooth H:4 driver
      Bluetooth: L2CAP: Fix missing line termination
      Bluetooth: L2CAP: Fix logs to account for BR/EDR signaling channel
      Bluetooth: L2CAP: Store BR/EDR fixed channel mask per channel
      Bluetooth: Refactor buffer handling for non-host managed buffers
      Bluetooth: Export helpers for defining buffer pools
      Bluetooth: drivers/nble: Fix minor coding style issue
      Bluetooth: Add support for waiting for "NOP" Command Complete
      Bluetooth: Provide static inline stubs for UUID string helpers
      Bluetooth: samples/shell: Make more features optional
      Bluetooth: samples: Add sample Kconfig for nimble based controllers
      Bluetooth: Add missing debug log to HCI driver send()
      Bluetooth: Add dedicated bt_send() function
      Bluetooth: Kconfig: Split debug selection into a choice
      Bluetooth: drivers/h5: Remove redundant BT_DBG()
      Bluetooth: tests: Add DEBUG_DRIVER to automated tests
      Bluetooth: Add custom "monitor" protocol logging over UART
      Bluetooth: tests: Add automated tests for new monitor code
      Bluetooth: Move HCI device bus information to the driver
      Bluetooth: Add name member to HCI driver struct
      Bluetooth: Add recently added SPI & I2C HCI bus defines
      Bluetooth: L2CAP: Fix coding style of bt_l2cap_chan_ops
      drivers: uart_qmsi: Re-enable HW FC for arduino_101 & quark_se_devboard
      Bluetooth: drivers/nble: Fix on_nble_gatts_read_evt() behavior
      Bluetooth: drivers/nble: Fix passing NULL to attr->read()
      Bluetooth: drivers/nble: Fix using too large buffer

Juan Manuel Cruz (3):
      debug: interrupt event logger support for arc
      debug: interrupt event logger sample for arc
      build: fixes issue in windows Kconfig support

Jukka Rissanen (25):
      net: coap: Add debug activation support to Kconfig
      net: contiki: Enhance the IPv6 prefix calculation routine
      net: coap: Add debugging support for CoAP internals
      net: coap: Delete network context when CoAP context is deleted
      net: coap: Make sure that local endpoint IP address is set
      net: Add Kconfig debug option for REST API
      net: contiki: Fix the timer expiration check
      Revert "net: Use TICKS_UNLIMITED if there are no timers"
      cc2520: Make the generated MAC address to look more random
      net: Removed obsolete print defines from slip driver
      net: buf: Add helper for catching ref counting errors
      net: buf: Check we are not overflowing free buf count
      net: buf: Fix the debug print when unreffing the net_buf
      net: buf: Add reference count check for IP buf
      net: buf: Fix the code indentation in ip_buf_unref()
      net: rdc: Debug print missing \n in simplerdc plugin
      net: Initial TCP support
      net: Enable TCP support
      net: tcp: Disable client role
      net: 802.15.4: Do not compress TCP packets
      net: Wakeup TX fiber when packet needs to be sent
      net: ipv4: Print configured IPv4 address to console
      net: apps: Add TCP support to echo-server application
      net: apps: Fix IPv4 support in echo-server
      net: apps: Set IPv4 configuration when doing automatic testing

Juro Bystricky (3):
      Makefile: Fix linking order of libraries
      arduino_101_backup.sh: Fixed misspelled envar
      arduino_101_load.sh: Fixed misspelled envar

Khem Raj (1):
      benchmark: Remove trailing whitespaces.

Laurentiu Palcu (15):
      sensor.h: add new attributes
      sensor.h: Add helper functions for unit conversions
      sensor: add driver for BMI160
      bmi160: Add sample application
      spi_dw: use SPI bus frequency in spi_dw_configure()
      sensor: bmi160: move sample app to arc subdirectory
      sensor: sensor.h: fix typo
      sensor: bmi160: add x86 app for Arduino101
      sensor: bmi160: move the printing macro to the header
      sensor: bmi160: create two wrappers for bmi160_reg_val_to_range
      sensor: bmi160: fix bmi160_reg_field_update function
      sensor: bmi160: make some read/write functions global
      sensor: bmi160: add support for triggers
      sensor: bmi160: add trigger tests to the application
      sensor: bmi160: switch to the new logging API

Luiz Augusto von Dentz (1):
      net: Use TICKS_UNLIMITED if there are no timers

Mariusz Skamra (6):
      Revert "Bluetooth: Fix compare logic in ATT read rsp"
      drivers/nble: Fix compare logic in on_nble_gattc_read_rsp
      drivers/nble: Fix handling read errors
      drivers/nble: Fix NULL pointer dereference
      Bluetooth: tester: Start using net_buf to store GATT database
      Bluetooth: tester: Update tester application README

Murtaza Alexandru (1):
      sensor: lsm9ds0-gyro: fix FULL_SCALE attribute

Peter Mitsis (1):
      nano_fifo: Fix problem with nano_fifo and timeouts

Ravi kumar Veeramally (5):
      net: Add Kconfig debug option for simple udp and udp packet
      net: Add Kconfig debug option for coap observe and well-known
      net: Fix ip_buf_len after removing extra header
      net: coap: Use correct network buffer in serialization
      net: coap: Create buffer while generating observe notification

Rodrigo Caballero (3):
      doc: Remove documentation collaboration section.
      doc: Remove communication section.
      doc: Modify the master file to a single ToC.

Sergio Rodriguez (1):
      rtc/qmsi: Fix the IRQ priority setting according to the SoC specific option

Szymon Janc (15):
      Bluetooth: shell: Use same config for arm and x86 build
      Bluetooth: SMP: Refactor pairing request handling
      Bluetooth: Add support for confirming incoming JustWorks pairing
      Bluetooth: shell: Add confirming incoming JustWorks pairing
      Bluetooth: Refactor bt_init
      Bluetooth: Simplify setting random address
      Bluetooth: Simplify setting advertising parameters
      Bluetooth: Simplify creation of LE connection
      Bluetooth: Remove double address comparison
      Bluetooth: Always use RPA for connection if privacy is enabled
      Bluetooth: Fail if advertise with unsupported address type
      Bluetooth: shell: Add support for advertising with RPA
      Bluetooth: Remove RX priority fiber
      Bluetooth: shell: Update advertising command help
      Bluetooth: SMP: Workaround LE SC bug in iOS

Tomasz Bursztyka (17):
      sys_clock: Add a helper to compute micro seconds
      drivers: Renaming directory "802.15.4" into "ieee802154"
      ieee802154: Replace the CC2520 driver with a new implementation
      tests: test_early_sleep: Let's test at all initialization level
      net: Test random is necessary to use CC2520 as radio driver
      cc2520: Set short address and ieee address from the driver
      cc2520: Enable hardware filtering all the time
      cc2520: Properly start and stop the device
      net: ieee802154: Add a simpler but working default RDC driver
      net: rdc: Make simplerdc a full replacement against nullrdc
      gpio: Improve the public API to handle multi callbacks
      sensors: Using new GPIO API callbacks
      samples: Using new GPIO API callbacks
      cc2520: Using new GPIO API callbacks
      gpio: Deprecate API 1.0 callback function
      sensor: bmi160: Use the new GPIO callback API
      samples: sensor: Use new GPIO callback API for bmi160 sample

Vlad Dogaru (5):
      samples: revert to default CFLAGS
      gpio: dw: add support for D2000 board
      doc: Add sensor section in API documentation
      doc: Add sensor section to kernel primer
      gpio: dw: Activate by default on D2000

Vlad Lungu (1):
      spi: intel: fix port 1 pin setup

Yannis Damigos (3):
      boards/olimexino_stm32: add new board
      doc/board: Add documentation file for olimexino_stm32
      sanitycheck: Add olimexino_stm32 board to sanitycheck

cacu (1):
      build: Add a toolchain file for the GCC ARM Embedded toolchain

jgarcia (1):
      net:apps: zperf application

 .gitignore                                         |    6 +-
 Makefile                                           |   24 +-
 Makefile.inc                                       |    4 +-
 arch/Kconfig                                       |   29 +-
 arch/arc/Kbuild                                    |    2 +-
 arch/arc/Kconfig                                   |   49 +-
 arch/arc/Makefile                                  |    2 +-
 arch/arc/core/isr_wrapper.S                        |   17 +
 arch/arc/core/reset.S                              |    2 +-
 arch/arc/include/kernel_event_logger_arch.h        |   46 +
 arch/arc/include/nano_private.h                    |   15 +
 arch/arc/soc/quark_se_ss/Kconfig.defconfig         |   32 +-
 arch/arc/soc/quark_se_ss/linker.cmd                |   12 +-
 arch/arc/soc/quark_se_ss/soc.h                     |   18 +-
 arch/arc/soc/quark_se_ss/soc_config.c              |    5 +-
 arch/arm/Kbuild                                    |    7 +-
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/Makefile                                  |    2 +-
 arch/arm/core/cortex_m/Makefile                    |    2 +-
 arch/arm/soc/fsl_frdm_k64f/Kbuild                  |    3 -
 arch/arm/soc/fsl_frdm_k64f/Kconfig                 |   71 -
 arch/arm/soc/fsl_frdm_k64f/Kconfig.defconfig       |  188 --
 arch/arm/soc/fsl_frdm_k64f/Kconfig.soc             |    6 -
 arch/arm/soc/fsl_frdm_k64f/Makefile                |    8 -
 arch/arm/soc/fsl_frdm_k64f/README.txt              |   10 -
 arch/arm/soc/fsl_frdm_k64f/linker.cmd              |   41 -
 arch/arm/soc/fsl_frdm_k64f/soc.c                   |  323 ---
 arch/arm/soc/fsl_frdm_k64f/soc.h                   |  264 ---
 arch/arm/soc/fsl_frdm_k64f/soc_config.c            |  127 -
 arch/arm/soc/fsl_frdm_k64f/wdog.S                  |   90 -
 arch/arm/soc/nxp_kinetis/Kbuild                    |    2 +
 arch/arm/soc/nxp_kinetis/Kconfig                   |   28 +
 arch/arm/soc/nxp_kinetis/Kconfig.defconfig         |    1 +
 arch/arm/soc/nxp_kinetis/Kconfig.soc               |   17 +
 arch/arm/soc/nxp_kinetis/k6x/Kbuild                |    3 +
 .../soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12  |  170 ++
 .../soc/nxp_kinetis/k6x/Kconfig.defconfig.series   |   41 +
 arch/arm/soc/nxp_kinetis/k6x/Kconfig.series        |   25 +
 arch/arm/soc/nxp_kinetis/k6x/Kconfig.soc           |   79 +
 arch/arm/soc/nxp_kinetis/k6x/Makefile              |    8 +
 arch/arm/soc/nxp_kinetis/k6x/README.txt            |   10 +
 arch/arm/soc/nxp_kinetis/k6x/linker.cmd            |   41 +
 arch/arm/soc/nxp_kinetis/k6x/soc.c                 |  323 +++
 arch/arm/soc/nxp_kinetis/k6x/soc.h                 |  264 +++
 arch/arm/soc/nxp_kinetis/k6x/soc_config.c          |  127 +
 arch/arm/soc/nxp_kinetis/k6x/wdog.S                |   90 +
 arch/arm/soc/st_stm32/Kbuild                       |    2 +
 arch/arm/soc/st_stm32/Kconfig                      |   10 +-
 arch/arm/soc/st_stm32/Kconfig.defconfig            |    2 +-
 arch/arm/soc/st_stm32/Kconfig.soc                  |    9 +-
 .../soc/st_stm32/stm32f1/Kconfig.defconfig.family  |   35 -
 .../soc/st_stm32/stm32f1/Kconfig.defconfig.series  |   35 +
 .../st_stm32/stm32f1/Kconfig.defconfig.stm32f103rb |    3 +
 .../st_stm32/stm32f1/Kconfig.defconfig.stm32f103ve |    4 +
 arch/arm/soc/st_stm32/stm32f1/Kconfig.series       |   25 +
 arch/arm/soc/st_stm32/stm32f1/Kconfig.soc          |   28 +
 arch/arm/soc/st_stm32/stm32f1/Kconfig.soc.family   |   28 -
 arch/arm/soc/ti_lm3s6965/Kconfig.defconfig         |    3 +
 arch/x86/Kbuild                                    |    3 +-
 arch/x86/Makefile                                  |    2 +-
 arch/x86/core/Makefile                             |    3 +
 arch/x86/core/debug/Makefile                       |    4 +
 arch/x86/core/debug/debug_frames.c                 |   31 +
 arch/x86/core/excstub.S                            |    5 +-
 arch/x86/core/fatal.c                              |    3 +
 arch/x86/core/i386_sysV_abi/intstub.S              |   57 +
 arch/x86/core/i386_sysV_abi/thread.c               |   14 +-
 arch/x86/core/offsets/offsets.c                    |    3 +
 arch/x86/debug/Makefile                            |    3 +
 arch/x86/debug/gdb_arch.c                          |  696 ++++++
 arch/x86/debug/gdb_arch_exc.S                      |   41 +
 arch/x86/debug/gdb_dbg_regs.S                      |   87 +
 arch/x86/include/debug/gdb_arch.h                  |  122 +
 arch/x86/include/nano_private.h                    |    4 +
 arch/x86/soc/atom/Kconfig.defconfig                |    3 +
 arch/x86/soc/ia32/Kconfig.defconfig                |   10 +
 arch/x86/soc/ia32/Makefile                         |    4 +
 arch/x86/soc/quark_d2000/Kconfig.defconfig         |  149 +-
 arch/x86/soc/quark_d2000/Makefile                  |    3 +
 arch/x86/soc/quark_d2000/soc.c                     |   37 -
 arch/x86/soc/quark_d2000/soc.h                     |  123 +-
 arch/x86/soc/quark_se/Kconfig.defconfig            |  305 +--
 arch/x86/soc/quark_se/Makefile                     |    3 +
 arch/x86/soc/quark_se/soc.c                        |   22 -
 arch/x86/soc/quark_se/soc.h                        |  174 +-
 arch/x86/soc/quark_se/soc_config.c                 |    5 +-
 arch/x86/soc/quark_x1000/Kconfig.defconfig         |   20 +-
 arch/x86/soc/quark_x1000/soc.h                     |   32 +
 boards/arduino_101/Kconfig.defconfig               |   26 +-
 boards/arduino_101/arduino_101_defconfig           |    6 +-
 boards/arduino_101/support/arduino_101_backup.sh   |    2 +-
 boards/arduino_101/support/arduino_101_load.sh     |    6 +-
 boards/arduino_101_sss/Makefile.board              |    4 +-
 boards/frdm_k64f/Kconfig.board                     |    2 +-
 boards/frdm_k64f/Kconfig.defconfig                 |    2 +-
 boards/frdm_k64f/frdm_k64f_defconfig               |    4 +-
 boards/galileo/Kconfig.defconfig                   |    9 +-
 boards/nucleo_f103rb/Makefile.board                |    6 +
 boards/nucleo_f103rb/nucleo_f103rb_defconfig       |    4 +-
 boards/nucleo_f103rb/support/openocd.cfg           |   12 +
 boards/olimexino_stm32/Kconfig.board               |   19 +
 boards/olimexino_stm32/Kconfig.defconfig           |   23 +
 boards/olimexino_stm32/Makefile                    |    5 +
 boards/olimexino_stm32/board.c                     |   17 +
 boards/olimexino_stm32/board.h                     |   22 +
 boards/olimexino_stm32/olimexino_stm32_defconfig   |   44 +
 boards/quark_d2000_crb/quark_d2000_crb_defconfig   |    2 +-
 boards/quark_se_devboard/Kconfig.defconfig         |   43 +-
 boards/quark_se_devboard/Makefile                  |    9 +
 boards/quark_se_devboard/board.c                   |   43 +-
 boards/quark_se_devboard/board.h                   |   24 +-
 .../quark_se_devboard/quark_se_devboard_defconfig  |    4 +-
 boards/quark_se_sss_devboard/Makefile.board        |    4 +-
 boards/stm32_mini_a15/stm32_mini_a15_defconfig     |    4 +-
 doc/Makefile                                       |    3 +-
 doc/api/api.rst                                    |    1 +
 doc/api/device.rst                                 |   17 +
 doc/api/io_interfaces.rst                          |    9 +-
 doc/board/board.rst                                |    1 +
 doc/board/frdm_k64f.rst                            |    2 +-
 doc/board/olimexino_stm32.rst                      |  405 ++++
 doc/board/quark_d2000_crb.rst                      |   81 +
 doc/collaboration/code/changes.rst                 |   74 -
 doc/collaboration/code/code.rst                    |   24 -
 doc/collaboration/code/coding_style.rst            |   39 -
 doc/collaboration/code/doxygen/defines.rst         |   74 -
 doc/collaboration/code/doxygen/doxygen.rst         |   61 -
 doc/collaboration/code/doxygen/ex_struct_pre.c     |   11 -
 doc/collaboration/code/doxygen/files.rst           |   57 -
 doc/collaboration/code/doxygen/functions.rst       |  154 --
 doc/collaboration/code/doxygen/groups.rst          |   56 -
 doc/collaboration/code/doxygen/hello_commented.c   |  188 --
 doc/collaboration/code/doxygen/hello_wrong.c       |   30 -
 .../code/doxygen/irq_test_common_commented.h       |  167 --
 .../code/doxygen/irq_test_common_wrong.h           |    5 -
 doc/collaboration/code/doxygen/phil_commented.h    |   46 -
 .../code/doxygen/phil_fiber_commented.c            |  148 --
 .../code/doxygen/phil_task_commented.c             |  107 -
 doc/collaboration/code/doxygen/structs.rst         |   59 -
 doc/collaboration/code/doxygen/typedefs.rst        |   55 -
 doc/collaboration/code/doxygen/variables.rst       |   71 -
 doc/collaboration/code/error_code_conventions.rst  |   36 -
 doc/collaboration/code/figures/gerrit01.png        |  Bin 51461 -> 0 bytes
 doc/collaboration/code/figures/gerrit02.png        |  Bin 10561 -> 0 bytes
 doc/collaboration/code/figures/gerrit03.png        |  Bin 9116 -> 0 bytes
 doc/collaboration/code/figures/gerrit04.png        |  Bin 10965 -> 0 bytes
 doc/collaboration/code/figures/gerrit05.png        |  Bin 19653 -> 0 bytes
 doc/collaboration/code/figures/gerrit06.png        |  Bin 59864 -> 0 bytes
 doc/collaboration/code/figures/gerrit07.png        |  Bin 35552 -> 0 bytes
 doc/collaboration/code/figures/gerrit08.png        |  Bin 13632 -> 0 bytes
 doc/collaboration/code/figures/gerrit09.png        |  Bin 13717 -> 0 bytes
 doc/collaboration/code/figures/gerrit10.png        |  Bin 49462 -> 0 bytes
 doc/collaboration/code/figures/setting_up01.png    |  Bin 26418 -> 0 bytes
 doc/collaboration/code/figures/setting_up02.png    |  Bin 23984 -> 0 bytes
 doc/collaboration/code/figures/setting_up03.png    |  Bin 19736 -> 0 bytes
 doc/collaboration/code/figures/setting_up04.png    |  Bin 12166 -> 0 bytes
 doc/collaboration/code/gerrit.rst                  |  336 ---
 doc/collaboration/code/gerrit_accounts.rst         |  134 --
 doc/collaboration/code/gerrit_practices.rst        |  425 ----
 doc/collaboration/code/maintainers.rst             |   11 -
 doc/collaboration/code/naming_conventions.rst      |  125 -
 doc/collaboration/collaboration.rst                |   14 -
 doc/collaboration/communication/communication.rst  |   24 -
 doc/collaboration/communication/mailing.rst        |   66 -
 doc/collaboration/documentation/about.rst          |   86 -
 doc/collaboration/documentation/basic.rst          |   74 -
 doc/collaboration/documentation/code_blocks.rst    |  152 --
 doc/collaboration/documentation/cross.rst          |  152 --
 doc/collaboration/documentation/detailed.rst       |   29 -
 doc/collaboration/documentation/documentation.rst  |   65 -
 doc/collaboration/documentation/figures/fibers.svg |  165 --
 .../documentation/figures/nanokernel_fiber-1.png   |  Bin 239059 -> 0 bytes
 doc/collaboration/documentation/images.rst         |   97 -
 doc/collaboration/documentation/inline.rst         |   99 -
 doc/collaboration/documentation/language.rst       |  445 ----
 doc/collaboration/documentation/lists.rst          |  111 -
 doc/collaboration/documentation/modular.rst        |  318 ---
 doc/collaboration/documentation/notices.rst        |   73 -
 doc/collaboration/documentation/parallelism.rst    |   32 -
 doc/collaboration/documentation/rest.rst           |   34 -
 doc/collaboration/documentation/simple.rst         |  303 ---
 doc/collaboration/documentation/steps.rst          |   30 -
 doc/collaboration/documentation/tables.rst         |   96 -
 doc/conf.py                                        |    4 +-
 doc/contribute/changes.rst                         |   74 +
 doc/contribute/code.rst                            |   21 +
 doc/contribute/coding_style.rst                    |   39 +
 doc/contribute/conventions.rst                     |  128 +
 doc/contribute/doxygen/defines.rst                 |   74 +
 doc/contribute/doxygen/doxygen.rst                 |   61 +
 doc/contribute/doxygen/ex_struct_pre.c             |   11 +
 doc/contribute/doxygen/files.rst                   |   57 +
 doc/contribute/doxygen/functions.rst               |  154 ++
 doc/contribute/doxygen/groups.rst                  |   56 +
 doc/contribute/doxygen/hello_commented.c           |  188 ++
 doc/contribute/doxygen/hello_wrong.c               |   30 +
 doc/contribute/doxygen/irq_test_common_commented.h |  167 ++
 doc/contribute/doxygen/irq_test_common_wrong.h     |    5 +
 doc/contribute/doxygen/phil_commented.h            |   46 +
 doc/contribute/doxygen/phil_fiber_commented.c      |  148 ++
 doc/contribute/doxygen/phil_task_commented.c       |  107 +
 doc/contribute/doxygen/structs.rst                 |   59 +
 doc/contribute/doxygen/typedefs.rst                |   55 +
 doc/contribute/doxygen/variables.rst               |   71 +
 doc/contribute/error_code_conventions.rst          |   36 +
 doc/contribute/figures/gerrit01.png                |  Bin 0 -> 51461 bytes
 doc/contribute/figures/gerrit02.png                |  Bin 0 -> 10561 bytes
 doc/contribute/figures/gerrit03.png                |  Bin 0 -> 9116 bytes
 doc/contribute/figures/gerrit04.png                |  Bin 0 -> 10965 bytes
 doc/contribute/figures/gerrit05.png                |  Bin 0 -> 19653 bytes
 doc/contribute/figures/gerrit06.png                |  Bin 0 -> 59864 bytes
 doc/contribute/figures/gerrit07.png                |  Bin 0 -> 35552 bytes
 doc/contribute/figures/gerrit08.png                |  Bin 0 -> 13632 bytes
 doc/contribute/figures/gerrit09.png                |  Bin 0 -> 13717 bytes
 doc/contribute/figures/gerrit10.png                |  Bin 0 -> 49462 bytes
 doc/contribute/figures/setting_up01.png            |  Bin 0 -> 26418 bytes
 doc/contribute/figures/setting_up02.png            |  Bin 0 -> 23984 bytes
 doc/contribute/figures/setting_up03.png            |  Bin 0 -> 19736 bytes
 doc/contribute/figures/setting_up04.png            |  Bin 0 -> 12166 bytes
 doc/contribute/gerrit.rst                          |  336 +++
 doc/contribute/gerrit_accounts.rst                 |  134 ++
 doc/contribute/gerrit_practices.rst                |  426 ++++
 doc/contribute/maintainers.rst                     |   11 +
 doc/doxygen.config                                 |    3 +-
 doc/drivers/drivers.rst                            |   43 +
 doc/drivers/synchronous_call.rst                   |   49 +
 doc/getting_started/building_zephyr.rst            |   94 -
 doc/getting_started/developing.rst                 |   27 -
 doc/getting_started/getting_started.rst            |  148 +-
 doc/getting_started/installation_linux.rst         |   95 +-
 doc/getting_started/installation_mac.rst           |   11 +-
 doc/getting_started/setting_up.rst                 |   64 -
 doc/index.rst                                      |   54 +-
 doc/kernel/devices/synchronous_call.rst            |   57 -
 doc/kernel/kernel.rst                              |    2 -
 doc/kernel/microkernel/microkernel.rst             |    1 -
 doc/kernel/microkernel/microkernel_fifos.rst       |    4 +-
 doc/kernel/microkernel/microkernel_mailboxes.rst   |    6 +-
 doc/kernel/microkernel/microkernel_pipes.rst       |    4 +-
 doc/kernel/microkernel/microkernel_task_irqs.rst   |  115 -
 doc/kernel/nanokernel/nanokernel_interrupts.rst    |   84 +-
 doc/kernel/networking/bluetooth.rst                |   77 -
 doc/kernel/networking/networking.rst               |   15 -
 doc/porting/arch.rst                               |  472 ++++
 doc/porting/porting.rst                            |   12 +
 doc/scripts/genrest/genrest.py                     |   27 +-
 doc/subsystems/networking/bluetooth.rst            |   76 +
 doc/subsystems/networking/networking.rst           |   15 +
 doc/subsystems/sensor.rst                          |  124 +
 doc/subsystems/subsystems.rst                      |   13 +
 drivers/802.15.4/Kconfig                           |   89 -
 drivers/802.15.4/Makefile                          |    6 -
 drivers/802.15.4/cc2520.c                          | 1273 ----------
 drivers/802.15.4/cc2520.h                          |  268 ---
 drivers/802.15.4/cc2520_arch.h                     |  294 ---
 drivers/Kconfig                                    |    2 +-
 drivers/Makefile                                   |   11 +-
 drivers/adc/Kconfig                                |   22 +-
 drivers/adc/adc_dw.c                               |   13 +-
 drivers/adc/adc_qmsi.c                             |    6 +-
 drivers/aio/Kconfig                                |   24 +-
 drivers/aio/Makefile                               |    3 -
 drivers/aio/aio_dw_comparator.c                    |  221 --
 drivers/aio/aio_dw_comparator.h                    |   65 -
 drivers/aio/aio_qmsi_comparator.c                  |    4 +-
 drivers/bluetooth/Kconfig                          |   31 +-
 drivers/bluetooth/Makefile                         |    2 +
 drivers/bluetooth/h4.c                             |   25 +-
 drivers/bluetooth/h5.c                             |   16 +-
 drivers/bluetooth/nble/Kconfig                     |  128 +
 drivers/bluetooth/nble/Makefile                    |    5 +
 drivers/bluetooth/nble/conn.c                      |  455 ++++
 drivers/bluetooth/nble/conn.h                      |   17 +
 drivers/bluetooth/nble/conn_internal.h             |   36 +
 drivers/bluetooth/nble/gap.c                       |  546 +++++
 drivers/bluetooth/nble/gap_internal.h              |  488 ++++
 drivers/bluetooth/nble/gatt.c                      | 1225 ++++++++++
 drivers/bluetooth/nble/gatt_internal.h             |  264 +++
 drivers/bluetooth/nble/rpc.h                       |  162 ++
 drivers/bluetooth/nble/rpc_deserialize.c           |  539 +++++
 drivers/bluetooth/nble/rpc_functions_to_ble_core.h |   97 +
 drivers/bluetooth/nble/rpc_functions_to_quark.h    |  115 +
 drivers/bluetooth/nble/rpc_serialize.c             |  339 +++
 drivers/bluetooth/nble/stubs.c                     |   84 +
 drivers/bluetooth/nble/uart.c                      |  252 ++
 drivers/bluetooth/nble/uart.h                      |  141 ++
 drivers/bluetooth/nrf51_pm.c                       |  109 +
 drivers/bluetooth/nrf51_pm.h                       |   21 +
 drivers/clock_control/Kconfig.stm32f10x            |    6 +-
 drivers/clock_control/quark_se_clock_control.c     |   17 +-
 drivers/clock_control/stm32f10x_clock.c            |   11 +-
 drivers/console/Kconfig                            |   12 +
 drivers/console/uart_console.c                     |   24 +
 drivers/counter/Kconfig                            |   10 +-
 drivers/counter/Makefile                           |    2 -
 drivers/counter/counter_qmsi_aonpt.c               |    4 +-
 drivers/ethernet/Kconfig                           |   49 +-
 drivers/ethernet/eth_dw.c                          |   22 +-
 drivers/flash/Kconfig                              |   35 +
 drivers/flash/Makefile                             |    1 +
 drivers/flash/soc_flash_qmsi.c                     |  245 ++
 drivers/flash/spi_flash_w25qxxdv.c                 |   10 +-
 drivers/gpio/Kconfig                               |    4 +-
 drivers/gpio/Kconfig.dw                            |  127 -
 drivers/gpio/Kconfig.k64                           |    2 +-
 drivers/gpio/Kconfig.qmsi                          |   24 +-
 drivers/gpio/Kconfig.stm32                         |    2 +-
 drivers/gpio/Makefile                              |    2 +
 drivers/gpio/gpio_api_compat.c                     |  100 +
 drivers/gpio/gpio_api_compat.h                     |   62 +
 drivers/gpio/gpio_atmel_sam3.c                     |   71 +-
 drivers/gpio/gpio_dw.c                             |  171 +-
 drivers/gpio/gpio_dw.h                             |    5 +-
 drivers/gpio/gpio_k64.c                            |  107 +-
 drivers/gpio/gpio_k64.h                            |    4 +-
 drivers/gpio/gpio_mmio.c                           |    6 +-
 drivers/gpio/gpio_pcal9535a.c                      |   12 +-
 drivers/gpio/gpio_qmsi.c                           |   58 +-
 drivers/gpio/gpio_sch.c                            |   71 +-
 drivers/gpio/gpio_sch.h                            |    5 +-
 drivers/gpio/gpio_stm32.c                          |   61 +-
 drivers/gpio/gpio_stm32.h                          |    4 +-
 drivers/gpio/gpio_utils.h                          |   70 +
 drivers/grove/Kconfig                              |    2 +-
 drivers/grove/lcd_rgb.c                            |   13 +
 drivers/i2c/Kconfig.atmel_sam3                     |    8 +-
 drivers/i2c/Kconfig.dw                             |   10 +-
 drivers/i2c/Kconfig.qmsi                           |   17 +-
 drivers/i2c/i2c_atmel_sam3.c                       |   16 +-
 drivers/i2c/i2c_dw.c                               |   33 +-
 drivers/i2c/i2c_qmsi.c                             |    8 +-
 drivers/i2c/i2c_quark_se_ss.c                      |   38 +-
 drivers/ieee802154/Kconfig                         |  120 +
 drivers/ieee802154/Makefile                        |    6 +
 drivers/ieee802154/ieee802154_cc2520.c             | 1168 +++++++++
 drivers/ieee802154/ieee802154_cc2520.h             |  211 ++
 drivers/ieee802154/ieee802154_cc2520_regs.h        |  353 +++
 drivers/interrupt_controller/Kconfig.stm32         |    6 +-
 drivers/interrupt_controller/Makefile              |    2 +-
 drivers/interrupt_controller/exti_stm32.c          |    6 +-
 drivers/ipm/ipm_quark_se.c                         |    3 +-
 drivers/ipm/ipm_quark_se.h                         |   10 +-
 drivers/nble/Kconfig                               |  126 -
 drivers/nble/Makefile                              |    3 -
 drivers/nble/conn.c                                |  446 ----
 drivers/nble/conn.h                                |   17 -
 drivers/nble/conn_internal.h                       |   36 -
 drivers/nble/gap.c                                 |  599 -----
 drivers/nble/gap_internal.h                        |  541 -----
 drivers/nble/gatt.c                                | 1146 ---------
 drivers/nble/gatt_internal.h                       |  261 ---
 drivers/nble/rpc.h                                 |  162 --
 drivers/nble/rpc_deserialize.c                     |  540 -----
 drivers/nble/rpc_functions_to_ble_core.h           |  104 -
 drivers/nble/rpc_functions_to_quark.h              |  118 -
 drivers/nble/rpc_serialize.c                       |  340 ---
 drivers/nble/stubs.c                               |   85 -
 drivers/nble/uart.c                                |  241 --
 drivers/nble/uart.h                                |  141 --
 drivers/nble/version.h                             |   83 -
 drivers/pinmux/Kconfig.k64                         |    2 +-
 drivers/pinmux/Kconfig.stm32                       |    2 +-
 drivers/pinmux/Makefile                            |    2 +-
 drivers/pinmux/dev/Kconfig                         |    6 +-
 drivers/pinmux/dev/pinmux_dev_atmel_sam3x.c        |    9 +-
 drivers/pinmux/dev/pinmux_dev_frdm_k64f.c          |    8 +-
 drivers/pinmux/dev/pinmux_dev_galileo.c            |   10 +-
 drivers/pinmux/dev/pinmux_dev_qmsi.c               |   10 +-
 drivers/pinmux/dev/pinmux_dev_quark_mcu.c          |   10 +-
 drivers/pinmux/dev/pinmux_dev_stm32.c              |   10 +-
 drivers/pinmux/galileo/pinmux_board_galileo.c      |    7 +
 .../pinmux/stm32/pinmux_board_olimexino_stm32.c    |   51 +
 drivers/pinmux/stm32/pinmux_stm32.h                |    2 +-
 drivers/pwm/Kconfig.dw                             |    4 +-
 drivers/pwm/Kconfig.k64                            |   10 +-
 drivers/pwm/Kconfig.pca9685                        |    2 +-
 drivers/pwm/Kconfig.qmsi                           |    2 +-
 drivers/pwm/pwm_dw.c                               |    9 +-
 drivers/pwm/pwm_k64_ftm.c                          |   30 +-
 drivers/pwm/pwm_pca9685.c                          |    4 +-
 drivers/qmsi/Kconfig                               |   23 +-
 drivers/qmsi/Makefile                              |   13 +
 drivers/qmsi/README                                |    6 +
 drivers/qmsi/drivers/include/qm_adc.h              |  188 ++
 drivers/qmsi/drivers/include/qm_aon_counters.h     |  155 ++
 drivers/qmsi/drivers/include/qm_comparator.h       |   80 +
 drivers/qmsi/drivers/include/qm_flash.h            |  205 ++
 drivers/qmsi/drivers/include/qm_fpr.h              |  168 ++
 drivers/qmsi/drivers/include/qm_gpio.h             |  143 ++
 drivers/qmsi/drivers/include/qm_i2c.h              |  242 ++
 drivers/qmsi/drivers/include/qm_identification.h   |   61 +
 drivers/qmsi/drivers/include/qm_init.h             |   62 +
 drivers/qmsi/drivers/include/qm_interrupt.h        |  176 ++
 drivers/qmsi/drivers/include/qm_mpr.h              |  123 +
 drivers/qmsi/drivers/include/qm_pic_timer.h        |  107 +
 drivers/qmsi/drivers/include/qm_pinmux.h           |  185 ++
 drivers/qmsi/drivers/include/qm_power.h            |   81 +
 drivers/qmsi/drivers/include/qm_pwm.h              |  155 ++
 drivers/qmsi/drivers/include/qm_rar.h              |   67 +
 drivers/qmsi/drivers/include/qm_rc.h               |   58 +
 drivers/qmsi/drivers/include/qm_rtc.h              |  115 +
 drivers/qmsi/drivers/include/qm_scss.h             |  288 +++
 drivers/qmsi/drivers/include/qm_spi.h              |  255 ++
 drivers/qmsi/drivers/include/qm_uart.h             |  317 +++
 drivers/qmsi/drivers/include/qm_version.h          |   74 +
 drivers/qmsi/drivers/include/qm_wdt.h              |  131 ++
 drivers/qmsi/drivers/qm_adc.c                      |  279 +++
 drivers/qmsi/drivers/qm_aon_counters.c             |  153 ++
 drivers/qmsi/drivers/qm_comparator.c               |   93 +
 drivers/qmsi/drivers/qm_flash.c                    |  321 +++
 drivers/qmsi/drivers/qm_fpr.c                      |  171 ++
 drivers/qmsi/drivers/qm_gpio.c                     |  152 ++
 drivers/qmsi/drivers/qm_i2c.c                      |  654 ++++++
 drivers/qmsi/drivers/qm_identification.c           |   55 +
 drivers/qmsi/drivers/qm_init.c                     |   35 +
 drivers/qmsi/drivers/qm_interrupt.c                |  131 ++
 drivers/qmsi/drivers/qm_mpr.c                      |  133 ++
 drivers/qmsi/drivers/qm_pic_timer.c                |  116 +
 drivers/qmsi/drivers/qm_pinmux.c                   |  102 +
 drivers/qmsi/drivers/qm_power.c                    |  349 +++
 drivers/qmsi/drivers/qm_pwm.c                      |  141 ++
 drivers/qmsi/drivers/qm_rar.c                      |   59 +
 drivers/qmsi/drivers/qm_rtc.c                      |   97 +
 drivers/qmsi/drivers/qm_scss.c                     |  248 ++
 drivers/qmsi/drivers/qm_spi.c                      |  504 ++++
 drivers/qmsi/drivers/qm_uart.c                     |  369 +++
 drivers/qmsi/drivers/qm_wdt.c                      |   99 +
 drivers/qmsi/include/qm_common.h                   |  208 ++
 drivers/qmsi/soc/quark_d2000/include/qm_soc_regs.h | 1070 +++++++++
 drivers/qmsi/soc/quark_se/include/qm_soc_regs.h    | 1162 +++++++++
 drivers/rtc/Kconfig                                |   38 +-
 drivers/rtc/Makefile                               |    3 -
 drivers/rtc/rtc_dw.c                               |  221 --
 drivers/rtc/rtc_dw.h                               |   69 -
 drivers/rtc/rtc_qmsi.c                             |    7 +-
 drivers/sensor/Kconfig                             |    4 +
 drivers/sensor/Kconfig.bma280                      |   62 +-
 drivers/sensor/Kconfig.bmc150_magn                 |    2 +-
 drivers/sensor/Kconfig.bmi160                      |  299 +++
 drivers/sensor/Kconfig.bmp280                      |    2 +-
 drivers/sensor/Kconfig.hdc1008                     |    2 +-
 drivers/sensor/Kconfig.isl29035                    |    2 +-
 drivers/sensor/Kconfig.lis3dh                      |    2 +-
 drivers/sensor/Kconfig.lsm9ds0_gyro                |    8 +-
 drivers/sensor/Kconfig.mcp9808                     |    2 +-
 drivers/sensor/Kconfig.sht3xd                      |    2 +-
 drivers/sensor/Kconfig.sx9500                      |    2 +-
 drivers/sensor/Kconfig.tmp007                      |  171 ++
 drivers/sensor/Makefile                            |    4 +
 drivers/sensor/sensor_bma280.c                     |   21 +-
 drivers/sensor/sensor_bma280.h                     |   43 +-
 drivers/sensor/sensor_bma280_trigger.c             |   36 +-
 drivers/sensor/sensor_bmc150_magn.c                |   27 +-
 drivers/sensor/sensor_bmc150_magn.h                |    2 +
 drivers/sensor/sensor_bmi160.c                     |  944 ++++++++
 drivers/sensor/sensor_bmi160.h                     |  498 ++++
 drivers/sensor/sensor_bmi160_trigger.c             |  348 +++
 drivers/sensor/sensor_hdc1008.c                    |   24 +-
 drivers/sensor/sensor_hdc1008.h                    |    1 +
 drivers/sensor/sensor_isl29035.c                   |   18 +-
 drivers/sensor/sensor_isl29035.h                   |   14 +
 drivers/sensor/sensor_isl29035_trigger.c           |   27 +-
 drivers/sensor/sensor_lis3dh.c                     |    8 +-
 drivers/sensor/sensor_lis3dh.h                     |    5 +-
 drivers/sensor/sensor_lis3dh_trigger.c             |   26 +-
 drivers/sensor/sensor_lsm9ds0_gyro.c               |   31 +-
 drivers/sensor/sensor_lsm9ds0_gyro.h               |    2 +
 drivers/sensor/sensor_mcp9808.c                    |    3 +-
 drivers/sensor/sensor_mcp9808.h                    |    3 +
 drivers/sensor/sensor_mcp9808_trigger.c            |   28 +-
 drivers/sensor/sensor_sht3xd.h                     |    2 +
 drivers/sensor/sensor_sht3xd_trigger.c             |   23 +-
 drivers/sensor/sensor_sx9500.c                     |    4 +-
 drivers/sensor/sensor_sx9500.h                     |    2 +
 drivers/sensor/sensor_sx9500_trigger.c             |   27 +-
 drivers/sensor/sensor_tmp007.c                     |  144 ++
 drivers/sensor/sensor_tmp007.h                     |  113 +
 drivers/sensor/sensor_tmp007_trigger.c             |  179 ++
 drivers/serial/Kconfig.qmsi                        |   15 +-
 drivers/serial/Kconfig.stm32                       |    2 +-
 drivers/serial/uart_atmel_sam3.c                   |    9 +-
 drivers/serial/uart_k20.c                          |   37 +-
 drivers/serial/uart_ns16550.c                      |   17 +-
 drivers/serial/uart_nsim.c                         |    2 +
 drivers/serial/uart_qmsi.c                         |   17 +-
 drivers/serial/uart_stellaris.c                    |   23 +-
 drivers/serial/uart_stm32.c                        |   44 +-
 drivers/spi/Kconfig                                |    6 +
 drivers/spi/Kconfig.dw                             |    7 -
 drivers/spi/Kconfig.intel                          |    8 -
 drivers/spi/Kconfig.k64                            |    2 +-
 drivers/spi/Kconfig.qmsi                           |   20 +-
 drivers/spi/spi_dw.c                               |   37 +-
 drivers/spi/spi_intel.c                            |    8 +-
 drivers/spi/spi_k64.c                              |   23 +-
 drivers/spi/spi_qmsi.c                             |   14 +-
 drivers/watchdog/Kconfig                           |   54 +-
 drivers/watchdog/Kconfig.stm32                     |    4 +-
 drivers/watchdog/Makefile                          |    2 -
 drivers/watchdog/iwdg_stm32.c                      |    8 +-
 drivers/watchdog/wdt_dw.c                          |  183 --
 drivers/watchdog/wdt_dw.h                          |   62 -
 drivers/watchdog/wdt_qmsi.c                        |    7 +-
 include/arch/arc/v2/linker.cmd                     |   14 +-
 include/arch/arm/cortex_m/scripts/linker.cmd       |    8 +
 include/arch/x86/arch.h                            |   10 +
 include/arch/x86/linker-common-sections.h          |    8 +
 include/bluetooth/bluetooth.h                      |    9 +-
 include/bluetooth/buf.h                            |   71 +
 include/bluetooth/conn.h                           |   12 +
 include/bluetooth/driver.h                         |   48 +-
 include/bluetooth/hci.h                            |   27 +-
 include/bluetooth/l2cap.h                          |   11 +-
 include/bluetooth/log.h                            |   34 +-
 include/bluetooth/storage.h                        |   91 +
 include/bluetooth/uuid.h                           |   13 +
 include/counter.h                                  |    1 +
 include/device.h                                   |  185 +-
 include/drivers/802.15.4/cc2520.h                  |   53 -
 .../drivers/clock_control/stm32_clock_control.h    |    2 +-
 .../drivers/clock_control/stm32f1_clock_control.h  |    4 +-
 include/drivers/console/uart_console.h             |   13 +
 include/gpio.h                                     |  164 +-
 include/i2c.h                                      |  145 ++
 include/irq.h                                      |   35 +-
 include/linker-defs.h                              |   21 +-
 include/microkernel/memory_pool.h                  |    2 +-
 include/microkernel/task_irq.h                     |   11 +-
 include/misc/debug/debug_info.h                    |   52 +
 include/misc/debug/gdb_server.h                    |   78 +
 include/misc/kernel_event_logger.h                 |   20 +-
 include/misc/slist.h                               |   12 +-
 include/nanokernel.h                               |   18 +-
 include/net/ip_buf.h                               |   20 +
 include/net/net_core.h                             |    6 +
 include/net/net_ip.h                               |    7 +
 include/pwm.h                                      |    1 -
 include/sensor.h                                   |   87 +-
 include/sys_clock.h                                |   13 +-
 include/toolchain/gcc.h                            |    3 +
 include/uart.h                                     |   32 +-
 kernel/microkernel/k_timer.c                       |   17 +-
 kernel/nanokernel/device.c                         |   47 +-
 kernel/nanokernel/include/nano_offsets.h           |    4 +
 kernel/nanokernel/nano_fifo.c                      |  107 +-
 lib/libc/minimal/include/string.h                  |    1 +
 lib/libc/minimal/source/string/string.c            |   14 +
 misc/debug/Kconfig                                 |  105 +-
 misc/debug/Makefile                                |    4 +
 misc/debug/gdb_server.c                            | 2468 ++++++++++++++++++++
 net/bluetooth/Kconfig                              |   57 +-
 net/bluetooth/Makefile                             |    4 +
 net/bluetooth/att.c                                |    4 +-
 net/bluetooth/conn.c                               | 1246 +++++-----
 net/bluetooth/conn_internal.h                      |    5 +-
 net/bluetooth/gatt.c                               |   30 +-
 net/bluetooth/hci_core.c                           |  567 +++--
 net/bluetooth/hci_core.h                           |   24 +-
 net/bluetooth/keys.c                               |   15 +-
 net/bluetooth/l2cap.c                              |  123 +-
 net/bluetooth/l2cap_internal.h                     |   17 +-
 net/bluetooth/monitor.c                            |  174 ++
 net/bluetooth/monitor.h                            |   86 +
 net/bluetooth/smp.c                                |  314 ++-
 net/bluetooth/smp.h                                |    2 +
 net/bluetooth/smp_null.c                           |   11 +-
 net/ip/Kconfig                                     |   41 +-
 net/ip/Kconfig.debug                               |   74 +
 net/ip/Makefile                                    |   10 +-
 net/ip/contiki/contiki-conf.h                      |   31 +-
 net/ip/contiki/contiki-default-conf.h              |    4 +-
 net/ip/contiki/ip/psock.c                          |  342 +++
 net/ip/contiki/ip/psock.h                          |  400 ++++
 net/ip/contiki/ip/simple-udp.c                     |   24 +-
 net/ip/contiki/ip/simple-udp.h                     |   10 +
 net/ip/contiki/ip/tcpip.c                          |   52 +-
 net/ip/contiki/ip/tcpip.h                          |   21 +-
 net/ip/contiki/ip/udp-socket.c                     |    4 +-
 net/ip/contiki/ip/uip-packetqueue.c                |    1 -
 net/ip/contiki/ip/uip-udp-packet.c                 |    5 +
 net/ip/contiki/ip/uip.h                            |   52 +-
 net/ip/contiki/ipv4/uip.c                          |  478 ++--
 net/ip/contiki/ipv6/uip6.c                         |  548 +++--
 net/ip/contiki/mac/nullrdc.c                       |  447 ----
 net/ip/contiki/mac/nullrdc.h                       |   48 -
 net/ip/contiki/mac/simplerdc.c                     |  289 +++
 net/ip/contiki/netstack.h                          |    2 +-
 net/ip/contiki/os/dev/slip.c                       |    4 +-
 net/ip/contiki/os/sys/ctimer.c                     |    4 +-
 net/ip/contiki/os/sys/etimer.c                     |    2 +-
 net/ip/contiki/os/sys/process.c                    |    7 +-
 net/ip/contiki/os/sys/process.h                    |   14 +-
 net/ip/contiki/os/sys/timer.c                      |   24 +-
 net/ip/contiki/sicslowpan/sicslowpan_compression.c |    9 +
 net/ip/er-coap/er-coap-context.c                   |   11 +-
 net/ip/er-coap/er-coap-engine.c                    |    8 +-
 net/ip/er-coap/er-coap-observe.c                   |   16 +-
 net/ip/er-coap/er-coap-res-well-known-core.c       |    4 +-
 net/ip/er-coap/er-coap-transactions.c              |    4 +-
 net/ip/er-coap/er-coap.c                           |   28 +-
 net/ip/ip_buf.c                                    |   71 +-
 net/ip/net_context.c                               |  240 +-
 net/ip/net_core.c                                  |  184 +-
 net/ip/net_driver_bt.c                             |    6 +-
 net/ip/net_driver_slip.c                           |    8 -
 net/ip/rest-engine/rest-engine.c                   |    8 +-
 net/ip/tinydtls/dtls.c                             |    4 +-
 net/ip/tinydtls/dtls.h                             |    2 +-
 samples/bluetooth/beacon/prj.conf                  |    2 +-
 samples/bluetooth/beacon/prj_nble.conf             |    3 +-
 samples/bluetooth/central_hr/prj.conf              |    2 +-
 samples/bluetooth/ipsp/prj_nimble.conf             |    7 +
 samples/bluetooth/peripheral/prj.conf              |    3 +-
 samples/bluetooth/peripheral/prj_nble.conf         |    3 +-
 samples/bluetooth/peripheral_esp/prj_nble.conf     |    3 +-
 samples/bluetooth/peripheral_hr/prj.conf           |    2 +-
 samples/bluetooth/peripheral_hr/prj_nble.conf      |    3 +-
 samples/drivers/adc/src/adc.c                      |    6 +-
 samples/drivers/adc/testcase.ini                   |    4 +-
 samples/drivers/aio_comparator/Makefile            |    5 +
 samples/drivers/aio_comparator/prj.conf            |    3 +
 samples/drivers/aio_comparator/src/Makefile        |    1 +
 samples/drivers/aio_comparator/src/main.c          |  118 +
 samples/drivers/aio_comparator/testcase.ini        |    6 +
 samples/drivers/aio_dw_comparator/Makefile         |    5 -
 samples/drivers/aio_dw_comparator/prj.conf         |    4 -
 samples/drivers/aio_dw_comparator/src/Makefile     |    1 -
 samples/drivers/aio_dw_comparator/src/main.c       |  118 -
 samples/drivers/aio_dw_comparator/testcase.ini     |    6 -
 samples/drivers/aon_counter/Makefile               |    2 +-
 samples/drivers/aon_counter/aon.config             |    6 -
 samples/drivers/aon_counter/prj.conf               |    2 +
 samples/drivers/aon_counter/testcase.ini           |    1 -
 samples/drivers/button/src/main.c                  |   11 +-
 samples/drivers/current_sensing/src/main.c         |    2 +-
 samples/drivers/gpio/src/main.c                    |   12 +-
 samples/drivers/grove_lcd/prj.conf                 |    1 -
 samples/drivers/i2c_fujitsu_fram/src/main.c        |    2 +-
 samples/drivers/i2c_lsm9ds0/src/main.c             |    2 +-
 samples/drivers/i2c_stts751/src/main.c             |    2 +-
 samples/drivers/led_apa102c/prj_x86.conf           |    2 -
 samples/drivers/led_apa102c/src/main.c             |    2 +-
 samples/drivers/pwm/prj_x86.conf                   |    1 -
 samples/drivers/pwm/src/main.c                     |   12 +-
 samples/drivers/rtc/Makefile                       |    2 +-
 samples/drivers/rtc/prj.conf                       |    3 +
 samples/drivers/rtc/rtc.config                     |    3 -
 samples/drivers/sensor_apds9960/src/main.c         |    2 +-
 samples/drivers/spi_flash/Makefile                 |    5 +
 samples/drivers/spi_flash/prj.conf                 |    6 +
 samples/drivers/spi_flash/src/Makefile             |    1 +
 samples/drivers/spi_flash/src/main.c               |   75 +
 samples/drivers/spi_flash/testcase.ini             |    4 +
 samples/drivers/uart/Makefile                      |    2 +-
 samples/drivers/uart/prj.conf                      |    2 +
 samples/drivers/uart/prj.config                    |    2 -
 samples/drivers/watchdog/Makefile                  |    2 +-
 samples/drivers/watchdog/prj.conf                  |    1 +
 samples/drivers/watchdog/src/main.c                |    6 -
 samples/drivers/watchdog/watchdog.config           |    1 -
 samples/environmental_sensing/README.txt           |   67 +
 samples/environmental_sensing/arc/Makefile         |    5 +
 samples/environmental_sensing/arc/prj.conf         |   21 +
 samples/environmental_sensing/arc/src/Makefile     |    5 +
 samples/environmental_sensing/arc/src/main.c       |  139 ++
 samples/environmental_sensing/x86/Makefile         |    5 +
 samples/environmental_sensing/x86/prj.conf         |   11 +
 samples/environmental_sensing/x86/src/Makefile     |    5 +
 samples/environmental_sensing/x86/src/main.c       |  143 ++
 samples/ipm/ipm_demo_arc/prj.conf                  |    1 -
 samples/ipm/ipm_demo_lmt/prj.conf                  |    1 -
 samples/kernel_event_logger/nanokernel/README.txt  |    4 +-
 .../kernel_event_logger/nanokernel/prj_arc.conf    |    5 +
 .../kernel_event_logger/nanokernel/testcase.ini    |    2 +-
 .../coap_observe_client/src/coap-observe-client.c  |    2 +-
 samples/net/common/net_testing.h                   |   33 +-
 samples/net/echo_client/prj_802154.conf            |    1 -
 samples/net/echo_client/prj_bt.conf                |    2 +-
 samples/net/echo_client/src/echo-client.c          |    7 +-
 samples/net/echo_server/prj_bt.conf                |    2 +-
 samples/net/echo_server/src/echo-server.c          |  131 +-
 samples/net/zperf/Makefile                         |    6 +
 samples/net/zperf/README                           |    7 +
 samples/net/zperf/prj.conf                         |    1 +
 samples/net/zperf/prj.mdef                         |    5 +
 samples/net/zperf/prj_galileo_ethernet.conf        |   30 +
 samples/net/zperf/src/Makefile                     |    9 +
 samples/net/zperf/src/shell_utils.c                |  161 ++
 samples/net/zperf/src/shell_utils.h                |   41 +
 samples/net/zperf/src/zperf.h                      |   37 +
 samples/net/zperf/src/zperf_internal.h             |   94 +
 samples/net/zperf/src/zperf_receiver.c             |  305 +++
 samples/net/zperf/src/zperf_shell.c                |  295 +++
 samples/net/zperf/src/zperf_uploader.c             |  222 ++
 samples/philosophers/microkernel/prj.mdef          |   14 +-
 samples/philosophers/microkernel/src/phil_task.c   |    2 +-
 samples/power/power_mgr/prj.conf                   |    1 +
 samples/power/power_mgr/src/main.c                 |   20 +-
 samples/sensor/bmi160/README                       |   25 +
 samples/sensor/bmi160/arc/Makefile                 |    6 +
 samples/sensor/bmi160/arc/prj.conf                 |   22 +
 samples/sensor/bmi160/arc/src/Makefile             |    1 +
 samples/sensor/bmi160/arc/src/arc_bmi160.c         |  464 ++++
 samples/sensor/bmi160/arc/testcase.ini             |    6 +
 samples/sensor/bmi160/x86/Makefile                 |    6 +
 samples/sensor/bmi160/x86/prj.conf                 |   15 +
 samples/sensor/bmi160/x86/src/Makefile             |    4 +
 samples/sensor/bmi160/x86/src/x86_bmi160.c         |   75 +
 samples/sensor/bmi160/x86/testcase.ini             |    6 +
 samples/sensor/magn_polling/Makefile               |    1 -
 samples/sensor/mcp9808/Makefile                    |    1 -
 samples/sensor/sx9500/prj.conf                     |    6 -
 samples/synchronization/microkernel/prj.mdef       |    4 +-
 scripts/Makefile.toolchain.gccarmemb               |   17 +
 scripts/Makefile.toolchain.iamcu                   |    4 -
 scripts/Makefile.toolchain.zephyr                  |   11 +-
 scripts/checkpatch.pl                              |    4 +-
 scripts/kconfig/zconf.l                            |    7 +-
 scripts/kconfig/zconf.lex.c_shipped                |    7 +-
 scripts/sanity_chk/arches/arm.ini                  |    2 +-
 scripts/sanity_chk/arches/x86.ini                  |    2 +-
 scripts/sanitycheck                                |  108 +-
 .../benchmark/footprint/microkernel/float/arm.conf |    3 -
 .../benchmark/footprint/microkernel/float/x86.conf |    4 +-
 tests/benchmark/footprint/microkernel/max/arm.conf |    2 -
 tests/benchmark/footprint/microkernel/max/x86.conf |    3 +-
 .../microkernel/src/microkernel_footprint.c        |    8 -
 tests/benchmark/footprint/nanokernel/max/arc.conf  |    1 -
 tests/benchmark/footprint/nanokernel/max/arm.conf  |    1 -
 tests/benchmark/footprint/nanokernel/max/x86.conf  |    1 -
 .../nanokernel/src/nanokernel_footprint.c          |    5 -
 tests/benchmark/object_footprint/Kconfig           |    4 -
 tests/benchmark/object_footprint/prj10.conf        |    2 -
 tests/benchmark/object_footprint/prj11.conf        |    2 -
 .../object_footprint/src/nanokernel_objects.c      |    6 -
 tests/benchmark/sys_kernel/microkernel/README.txt  |   24 +-
 tests/benchmark/sys_kernel/nanokernel/README.txt   |   24 +-
 tests/bluetooth/init/prj.conf                      |    2 +-
 tests/bluetooth/init/prj_17.conf                   |    3 +-
 tests/bluetooth/init/prj_20.conf                   |   24 +
 tests/bluetooth/init/prj_21.conf                   |   23 +
 tests/bluetooth/init/prj_h5.conf                   |    1 -
 tests/bluetooth/init/prj_h5_dbg.conf               |    5 +
 tests/bluetooth/init/testcase.ini                  |   14 +
 tests/bluetooth/shell/Makefile                     |    2 +-
 tests/bluetooth/shell/prj.conf                     |   15 +
 tests/bluetooth/shell/prj_arm.conf                 |   14 -
 tests/bluetooth/shell/prj_nble.conf                |    2 +-
 tests/bluetooth/shell/prj_nimble.conf              |   14 +
 tests/bluetooth/shell/prj_x86.conf                 |   14 -
 tests/bluetooth/shell/src/main.c                   |   51 +-
 tests/bluetooth/test_bluetooth/prj.conf            |    2 +-
 tests/bluetooth/test_bluetooth/src/bluetooth.c     |    4 +-
 tests/bluetooth/tester/README                      |   54 +-
 tests/bluetooth/tester/btp_spec.txt                |   29 +
 tests/bluetooth/tester/prj.conf                    |    2 +-
 tests/bluetooth/tester/src/bttester.c              |    7 +-
 tests/bluetooth/tester/src/gap.c                   |   28 +-
 tests/bluetooth/tester/src/gatt.c                  |  408 ++--
 tests/drivers/pinmux/Makefile                      |    5 +
 tests/drivers/pinmux/README.txt                    |    3 +
 tests/drivers/pinmux/prj_arduino_101.conf          |    2 +
 tests/drivers/pinmux/prj_arduino_due.conf          |    2 +
 tests/drivers/pinmux/prj_frdm_k64f.conf            |    2 +
 tests/drivers/pinmux/prj_galileo.conf              |    2 +
 tests/drivers/pinmux/prj_nucleo_f103rb.conf        |    2 +
 tests/drivers/pinmux/prj_olimexino_stm32.conf      |    2 +
 tests/drivers/pinmux/prj_quark_d2000_crb.conf      |    2 +
 tests/drivers/pinmux/prj_quark_se_devboard.conf    |    2 +
 tests/drivers/pinmux/prj_stm32_mini_a15.conf       |    2 +
 tests/drivers/pinmux/src/Makefile                  |    1 +
 tests/drivers/pinmux/src/main.c                    |   39 +
 tests/drivers/pinmux/testcase.ini                  |    4 +
 tests/kernel/test_early_sleep/README.txt           |    5 +-
 tests/kernel/test_early_sleep/src/early_sleep.c    |  100 +
 tests/kernel/test_task_irq/Makefile                |    6 -
 tests/kernel/test_task_irq/README.txt              |   58 -
 tests/kernel/test_task_irq/prj.mdef                |   14 -
 tests/kernel/test_task_irq/prj_arm.conf            |    6 -
 tests/kernel/test_task_irq/prj_x86.conf            |    5 -
 tests/kernel/test_task_irq/src/Makefile            |    3 -
 tests/kernel/test_task_irq/src/main.c              |  147 --
 tests/kernel/test_task_irq/src/raise_int.c         | 1406 -----------
 tests/kernel/test_task_irq/src/test_device.c       |  185 --
 tests/kernel/test_task_irq/testcase.ini            |    3 -
 .../test_tickless/microkernel/src/timestamps.c     |    2 +-
 .../kernel/test_tickless/microkernel/testcase.ini  |    2 +-
 787 files changed, 40097 insertions(+), 21298 deletions(-)


Re: [RFC PATCH 3/6] i2c: add device config helpers

Benjamin Walsh <benjamin.walsh@...>
 

On Mon, Apr 25, 2016 at 01:10:49PM +0200, Tomasz Bursztyka wrote:
Hi Vlad,

Add some macros that drivers and applications can use in describing I2C
clients.

Change-Id: Ic7af97804e88ed3b9d4f68f9ac358a425f4cc17c
Signed-off-by: Vlad Dogaru <vlad.dogaru(a)intel.com>
---
include/i2c.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/include/i2c.h b/include/i2c.h
index d1c699c..87cb071 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -266,6 +266,23 @@ static inline int i2c_resume(struct device *dev)
return api->resume(dev);
}
+struct i2c_client_config {
+ //struct device *i2c_master;
+ char *i2c_master;
+ uint16_t i2c_addr;
+};
+
+#define DECLARE_I2C_CLIENT_CONFIG struct i2c_client_config i2c_client
+
+#define I2C_CLIENT(master, addr) \
I don't know if their is a rule for macro's parameter naming.
My personal - and thus subjective - opinion is to separate those to
actual C code, and
I tend to enclose these with '_', so it would be _master_, _addr_
Or prefixing with '__' works as well.
Leading underscore is reserved by the kernel for internal global
symbols.


+ .i2c_client = { \
So it means we cannot use anything else but "i2c_client" as a name
in our device's configuration structure?
Would be easier that way:
{ \
.i2c_master = (master), \
.i2c_addr = (addr) \
}

Thus usage would be:

my_dev_config.i2c_info = I2C_CLIENT(foo, bar)

+ .i2c_master = (master), \
+ .i2c_addr = (addr), \
+ }
+
+#define GET_I2C_MASTER(conf) ((conf)->i2c_client.i2c_master)
+#define GET_I2C_ADDR(conf) ((conf)->i2c_client.i2c_addr)
I2C_ prefixed

And names are not relevant enough. What's the form of master's
information? What address?
So:
I2C_GET_MASTER_NAME()
I2C_GET_CLIENT_ADDR() (or _ADDRESS() actually)


And finally, document the struct and the macros.

Tomasz


Re: [RFC PATCH 2/6] sensor: add device config helpers

Benjamin Walsh <benjamin.walsh@...>
 

On Fri, Apr 22, 2016 at 01:15:59AM +0300, Vlad Dogaru wrote:
Define some configuration structures and macros that can be used in
device configuration. These usage scenarios are as follows:

* device drivers will use DECLARE_* macros in their device
configuration structures and GET_* macros in the init functions;

* application code will use SENSOR_TRIG_* to fill in the device
configuration structures.

We also define a convenient wrapper for starting a new fiber based on a
given configuration.

Change-Id: I3a897999175b14a4cd1111da4c26434741294e52
Signed-off-by: Vlad Dogaru <vlad.dogaru(a)intel.com>
---
include/sensor.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

diff --git a/include/sensor.h b/include/sensor.h
index 918326a..8312b5a 100644
--- a/include/sensor.h
+++ b/include/sensor.h
@@ -190,6 +190,18 @@ enum sensor_attribute {
SENSOR_ATTR_CALIB_TARGET,
};

+enum sensor_trigger_mode {
+ SENSOR_TRIG_MODE_NONE,
+ SENSOR_TRIG_MODE_OWN,
+ SENSOR_TRIG_MODE_GLOBAL,
+};
+
+struct fiber_config {
+ void *fiber_stack;
+ unsigned int fiber_stack_size;
+ unsigned int fiber_priority;
+};
+
typedef void (*sensor_trigger_handler_t)(struct device *dev,
struct sensor_trigger *trigger);

@@ -334,6 +346,15 @@ static inline int sensor_channel_get(struct device *dev,
return api->channel_get(dev, chan, val);
}

+static inline nano_thread_id_t
+sensor_fiber_start(const struct fiber_config *cfg,
+ nano_fiber_entry_t entry, int arg1, int arg2,
+ unsigned options)
+{
+ return fiber_start(cfg->fiber_stack, cfg->fiber_stack_size,
+ entry, arg1, arg2, cfg->fiber_priority,
+ options);
+}

#ifdef CONFIG_SENSOR_DELAYED_WORK
/**
@@ -425,6 +446,29 @@ static inline void sensor_degrees_to_rad(int32_t d, struct sensor_value *rad)
rad->val2 = ((int64_t)d * SENSOR_PI / 180LL) % 1000000LL;
}

+#define DECLARE_SENSOR_TRIG_CONFIG \
^^^^^^^
DEFINE ? SENSOR_ prefix ?

+ enum sensor_trigger_mode trig_mode; \
+ struct fiber_config fiber_config
+
+#define SENSOR_TRIG_OWN_FIBER(stack, prio) \
+ .trig_mode = SENSOR_TRIG_MODE_OWN, \
+ .fiber_config = { \
+ .fiber_stack = (stack), \
+ .fiber_stack_size = sizeof(stack), \
+ .fiber_priority = (prio), \
+ }
+
+#define SENSOR_TRIG_GLOBAL_FIBER \
+ .trig_mode = SENSOR_TRIG_MODE_GLOBAL, \
+ .fiber_config = { \
+ .fiber_stack = NULL, \
+ .fiber_stack_size = 0, \
+ .fiber_priority = 0, \
+ }
+
+#define GET_SENSOR_TRIG_MODE(conf) ((conf)->trig_mode)
+#define GET_SENSOR_FIBER_CONFIG(conf) ((conf)->fiber_config)
+
#ifdef __cplusplus
}
#endif
--
1.9.1


Re: [RFC PATCH 2/6] sensor: add device config helpers

Benjamin Walsh <benjamin.walsh@...>
 

On Mon, Apr 25, 2016 at 01:58:12PM +0300, Vlad Dogaru wrote:
On Mon, Apr 25, 2016 at 12:59:57PM +0200, Tomasz Bursztyka wrote:
Hi Vlad,

Define some configuration structures and macros that can be used in
device configuration. These usage scenarios are as follows:

* device drivers will use DECLARE_* macros in their device
configuration structures and GET_* macros in the init functions;

* application code will use SENSOR_TRIG_* to fill in the device
configuration structures.

We also define a convenient wrapper for starting a new fiber based on a
given configuration.

Change-Id: I3a897999175b14a4cd1111da4c26434741294e52
Signed-off-by: Vlad Dogaru <vlad.dogaru(a)intel.com>
---
include/sensor.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

diff --git a/include/sensor.h b/include/sensor.h
index 918326a..8312b5a 100644
--- a/include/sensor.h
+++ b/include/sensor.h
@@ -190,6 +190,18 @@ enum sensor_attribute {
SENSOR_ATTR_CALIB_TARGET,
};
+enum sensor_trigger_mode {
+ SENSOR_TRIG_MODE_NONE,
+ SENSOR_TRIG_MODE_OWN,
+ SENSOR_TRIG_MODE_GLOBAL,
+};
+
+struct fiber_config {
Since it's part of public sensor API, rename it to: struct
sensor_fiber_config
If it stays here, then yeah, it makes sense to prefix it with "sensor_".

The question is if other subsystems would benefit from such a structure.
As it's defined now, there is nothing sensor specific about it or the
helper function that starts a fiber. Should I move them to a system
header so others can use them?
Were you envisionning having this as a "device" type of fiber, or were
you thinking having this as an even more generic concept ?


+ void *fiber_stack;
+ unsigned int fiber_stack_size;
+ unsigned int fiber_priority;
+};
+
typedef void (*sensor_trigger_handler_t)(struct device *dev,
struct sensor_trigger *trigger);
@@ -334,6 +346,15 @@ static inline int sensor_channel_get(struct device *dev,
return api->channel_get(dev, chan, val);
}
+static inline nano_thread_id_t
+sensor_fiber_start(const struct fiber_config *cfg,
+ nano_fiber_entry_t entry, int arg1, int arg2,
+ unsigned options)
+{
+ return fiber_start(cfg->fiber_stack, cfg->fiber_stack_size,
+ entry, arg1, arg2, cfg->fiber_priority,
+ options);
+}
#ifdef CONFIG_SENSOR_DELAYED_WORK
/**
@@ -425,6 +446,29 @@ static inline void sensor_degrees_to_rad(int32_t d, struct sensor_value *rad)
rad->val2 = ((int64_t)d * SENSOR_PI / 180LL) % 1000000LL;
}
+#define DECLARE_SENSOR_TRIG_CONFIG \
+ enum sensor_trigger_mode trig_mode; \
+ struct fiber_config fiber_config
+
+#define SENSOR_TRIG_OWN_FIBER(stack, prio) \
+ .trig_mode = SENSOR_TRIG_MODE_OWN, \
+ .fiber_config = { \
+ .fiber_stack = (stack), \
+ .fiber_stack_size = sizeof(stack), \
+ .fiber_priority = (prio), \
+ }
+
+#define SENSOR_TRIG_GLOBAL_FIBER \
+ .trig_mode = SENSOR_TRIG_MODE_GLOBAL, \
+ .fiber_config = { \
+ .fiber_stack = NULL, \
+ .fiber_stack_size = 0, \
+ .fiber_priority = 0, \
+ }
+
+#define GET_SENSOR_TRIG_MODE(conf) ((conf)->trig_mode)
+#define GET_SENSOR_FIBER_CONFIG(conf) ((conf)->fiber_config)
SENSOR_ prefixed
Will do.


+
#ifdef __cplusplus
}
#endif
Thanks,
Vlad
--
Benjamin Walsh, SMTS
Wind River Rocket
www.windriver.com
Zephyr kernel maintainer
www.zephyrproject.org


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 0

UPDATED JIRA items within last 24 hours: 0

CLOSED JIRA items within last 24 hours: 0

RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1683 : doc: Remove references to Bluetooth from Networking
- https://gerrit.zephyrproject.org/r/1682 : gpio: Fix returning codes
- https://gerrit.zephyrproject.org/r/1681 : ieee802154: Fix returning codes
- https://gerrit.zephyrproject.org/r/1679 : arduino 101: use QMSI spi driver
- https://gerrit.zephyrproject.org/r/1678 : quark_se_devboard: use QMSI drivers
- https://gerrit.zephyrproject.org/r/1674 : Bluetooth: L2CAP: Move BREDR signalling management to l2cap_br.c
- https://gerrit.zephyrproject.org/r/1673 : Bluetooth: L2CAP: Move BREDR tx signalling pool definition to l2cap_br.c
- https://gerrit.zephyrproject.org/r/1668 : arch/Makefile: simplify
- https://gerrit.zephyrproject.org/r/1667 : Makefile.toolchain.zephyr: add nios2 arch
- https://gerrit.zephyrproject.org/r/1666 : nios2: basic build, non-functional
- https://gerrit.zephyrproject.org/r/1655 : newlib: Change location of libraries
- https://gerrit.zephyrproject.org/r/1651 : net/loopback: add missing license
- https://gerrit.zephyrproject.org/r/1661 : tests: Add unit test for sys_callout API
- https://gerrit.zephyrproject.org/r/1656 : doc: Updates the toolchain path format instruction

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1387 : Bluetooth: gatt: include service api definition proposal
- https://gerrit.zephyrproject.org/r/1648 : net: buf: Add fragmentation API support
- https://gerrit.zephyrproject.org/r/1029 : device: Remove DEV_* codes
- https://gerrit.zephyrproject.org/r/1519 : doc: add step for windows build configuration
- https://gerrit.zephyrproject.org/r/1593 : nanokernel: Add callout API
- https://gerrit.zephyrproject.org/r/1263 : build: support icx llvm compiler
- https://gerrit.zephyrproject.org/r/1360 : sensor: fix init driver_api
- https://gerrit.zephyrproject.org/r/1596 : sensor: migrate all drivers to new SYS_LOG
- https://gerrit.zephyrproject.org/r/1649 : net: buf: Add fragmentation API tests
- https://gerrit.zephyrproject.org/r/1616 : samples: mcp9808: support two devices
- https://gerrit.zephyrproject.org/r/1613 : i2c: add device config helpers
- https://gerrit.zephyrproject.org/r/1341 : sensor: add driver for LSM9DS0 accel and magn
- https://gerrit.zephyrproject.org/r/1601 : doc: power_mgmt: Added Power Management documentation
- https://gerrit.zephyrproject.org/r/1579 : Add capability to output binary data over console UART
- https://gerrit.zephyrproject.org/r/1581 : Task monitor: move to "no_sync" API to feed kernel event logger
- https://gerrit.zephyrproject.org/r/1580 : Add support of event logger put/get without sync
- https://gerrit.zephyrproject.org/r/1583 : kernel event profiler: add dynamic enable/disable/configure
- https://gerrit.zephyrproject.org/r/1577 : Set kernel event logger timestamps to HW cycles
- https://gerrit.zephyrproject.org/r/1578 : Add interrupt stub label for profiler (interrupt event)
- https://gerrit.zephyrproject.org/r/1582 : qemu: Add possibility to redirect serial port to pseudo TTY
- https://gerrit.zephyrproject.org/r/1623 : device: simplify synchronization
- https://gerrit.zephyrproject.org/r/1380 : nanokernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1379 : microkernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1594 : Bluetooth: SMP: Make use of sys_callout API
- https://gerrit.zephyrproject.org/r/1411 : build: add arc support to issm toolchain
- https://gerrit.zephyrproject.org/r/1376 : kernel: Init back pointer to microkernel task

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1680 : doc: Move Bluetooth into a separate subsystem
- https://gerrit.zephyrproject.org/r/1677 : Bluetooth: drivers/nble: Initial implementation of bt_storage_clear()
- https://gerrit.zephyrproject.org/r/1676 : Bluetooth: drivers/nble: Clear bonds upon init
- https://gerrit.zephyrproject.org/r/1653 : i2c: change i2c_reg_update_byte parameter order
- https://gerrit.zephyrproject.org/r/1670 : sensor: bmi160: fix regression
- https://gerrit.zephyrproject.org/r/1672 : microkernel: Match alignment with open parenthesis
- https://gerrit.zephyrproject.org/r/1654 : sensors: use I2C register access API
- https://gerrit.zephyrproject.org/r/1675 : gpio: pcal9535a: use I2C register access API
- https://gerrit.zephyrproject.org/r/1669 : sensor: bmi160: switch x86 app to QMSI GPIO driver
- https://gerrit.zephyrproject.org/r/1658 : net: apps: Break long strings in loopback test
- https://gerrit.zephyrproject.org/r/1671 : Bluetooth: Fix monitor init priority
- https://gerrit.zephyrproject.org/r/1663 : Zephyr 1.3.0-rc1
- https://gerrit.zephyrproject.org/r/1665 : arduino_101_load.sh: Fixed misspelled envar
- https://gerrit.zephyrproject.org/r/1664 : arduino_101_backup.sh: Fixed misspelled envar
- https://gerrit.zephyrproject.org/r/1662 : Changes needed for current working builders
- https://gerrit.zephyrproject.org/r/1660 : Bluetooth: drivers/nble: Fix using too large buffer
- https://gerrit.zephyrproject.org/r/1659 : Bluetooth: drivers/nble: Fix passing NULL to attr->read()
- https://gerrit.zephyrproject.org/r/1657 : Bluetooth: drivers/nble: Fix on_nble_gatts_read_evt() behavior
- https://gerrit.zephyrproject.org/r/1652 : i2c: fix i2c_reg_update_byte
- https://gerrit.zephyrproject.org/r/1646 : Bluetooth: L2CAP: Add API to register PSM server
- https://gerrit.zephyrproject.org/r/1645 : Bluetooth: L2CAP: L2CAP_DYNAMIC_CHANNEL enabled by default when BREDR
- https://gerrit.zephyrproject.org/r/1641 : gpio: rename device name for AON GPIO
- https://gerrit.zephyrproject.org/r/1640 : qmsi: gpio: add initialisation priority for driver
- https://gerrit.zephyrproject.org/r/1644 : samples: synchronization: reduce stack size used
- https://gerrit.zephyrproject.org/r/1642 : sx9500: remove explicit definitions for GPIO/I2C
- https://gerrit.zephyrproject.org/r/1630 : arc: make SRAM/DCCM values configurable
- https://gerrit.zephyrproject.org/r/1643 : samples: philosophers: reduce stack size used
- https://gerrit.zephyrproject.org/r/1638 : build: generate error if board is not found
- https://gerrit.zephyrproject.org/r/1639 : doc: fix typo IMACU -> IAMCU
- https://gerrit.zephyrproject.org/r/1626 : toolchain: move iamcu output format/arch to SoC
- https://gerrit.zephyrproject.org/r/1628 : i2c: use I2C_X nameing instead of I2CX
- https://gerrit.zephyrproject.org/r/1627 : aio: build only when driver is configured in
- https://gerrit.zephyrproject.org/r/1135 : boards: nucleo: Adding flash support
- https://gerrit.zephyrproject.org/r/1629 : grove: use default i2c device set in Kconfig
- https://gerrit.zephyrproject.org/r/1632 : sensor: bmi160: Use the new GPIO callback API
- https://gerrit.zephyrproject.org/r/1633 : samples: sensor: Use new GPIO callback API for bmi160 sample


Re: [RFC PATCH 3/6] i2c: add device config helpers

Vlad Dogaru <vlad.dogaru@...>
 

On Mon, Apr 25, 2016 at 01:59:42PM +0200, Tomasz Bursztyka wrote:
Hi Vlad,

The configuration tool needs to generate config structures (see
devices.c in patch 6/6). These structures are device specific, but the
tool should be as generic as possible. Hard coding the struct member
name to "i2c_client" helps achieve that.

Thus, assuming the macros are correctly used, the config tool needs only
information such as "this device is connected to master I2C0, address
0x76", to generate "I2C_CLIENT(I2C0, 0x76)". Allowing the name to
change would be an extra variable.
Ok, so it would be really great know a lot more about this tool.
Adding Tony, he can explain more about the tool.

Thanks,
Vlad


Re: [RFCv2 1/2] misc: Add timer API

Luiz Augusto von Dentz
 

Hi Ben,

On Mon, Apr 25, 2016 at 6:50 PM, Benjamin Walsh
<benjamin.walsh(a)windriver.com> wrote:
On Mon, Apr 25, 2016 at 02:08:00PM +0200, Tomasz Bursztyka wrote:
Hi Benjamin,

2. I am not sure about the naming. This is yet another timer library,
when we already have nano timers and micro timers. What makes it special
is its callback functionality. Can we try to get that into the name ?
Sure we can add a timeout or callback to the name, but IMO this would
be much more useful than nano_timer thus why I would like to promote
it over it.
Since nobody is suggesting anything here are some alternatives:

sys_timer_callback*: quite long imo
sys_callback: doesn't say much
sys_timeout: I would favor this one
Me too.

I would prefer sys_callback I think: you add a callback with a timeout
shows that there is a timeout/timer IMHO.
A timeout says all without people to read parameters. At a timeout
usually, it means you want to do something, thus the callback. It's
not suprizing timeout keyword is usually preferred in some user-land
libraries on Linux or else.
Don't you think it would be confusing for a user that we have two timer
APIs and a timeout API ?
Well that was what I mentioned that the use of nano_timer is very
limited, if you look at the unit test you will quickly realize how
hard it is to use in practice. That said Im in favor of push this
quickly and then decide the name later since we do depend in this
functionality to implement some protocol requirements in Bluetooth and
probably IP will switch to use it as well.

--
Luiz Augusto von Dentz


References to libgcc

Vinayak Kariappa <vinayak.kariappa@...>
 

Hi,

I prefer building zephyr the linux kernel way, which is (what i am used too):

$ make ARCH=arm CROSS_COMPILE=arm-none-eabi- ZEPHYR_BASE=~/workspace/zephyr menuconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi- ZEPHYR_BASE=~/workspace/zephyr

Problem is my code uses 64-bit division operations and references to __aeabi_uldivmod are required.
On the IRC, the discussion suggested to stay away from using division operations and libgcc.

But I see that toolchain settings actively link libgcc, sample:
scripts/Makefile.toolchain.zephyr:72:TOOLCHAIN_LIBS = gcc

So, in Zephyr, libgcc is permitted in contrary to Linux kernel?

7461 - 7480 of 8098