Michal Bloch [Mon, 7 Dec 2020 21:09:12 +0000 (22:09 +0100)]
Fix a memleak
Change-Id: I8387f40aa78f329b3c2f3293765e1f38ae0a6447
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
(cherry picked from commit
394f4ab4498610ac3b8112c7a5ba7b42edc60933)
Konrad Kuchciak [Tue, 18 Aug 2020 11:45:19 +0000 (13:45 +0200)]
Release 0.1.4
Change-Id: I671a5c8ecde207a2a01ee2c49291ef9bd44b4b0a
Konrad Kuchciak [Tue, 18 Aug 2020 11:13:18 +0000 (13:13 +0200)]
uart: Add ttyAMA1 interface to rpi4 config
Change-Id: I200a0bed764d5fb65ae0c9aa499bb4389792adf2
Karol Lewandowski [Mon, 10 Aug 2020 14:02:32 +0000 (16:02 +0200)]
Do not pass internal pointers to clients
Before this commit peripheral-bus would pass pointers to
local structures to clients via dbus. This scheme broke
on aarch64 as the pointers were converted to 32-bit uint
dbus type.
This commits introduces random-number based handle ids
that are mapped from/to internal pointers.
Change-Id: Id12156e251526b79f1b9207c85f6b618871e9d38
Karol Lewandowski [Mon, 27 Jul 2020 23:11:36 +0000 (01:11 +0200)]
Fix svace issues
This commit fixes double close and strcmp with NULL, as reported by SVACE.
Change-Id: Ie9e104dc1f5d2c65d6ea568c73e909602990cc31
Konrad Kuchciak [Thu, 23 Jul 2020 11:35:54 +0000 (13:35 +0200)]
Change user from root to system_fw
Change-Id: I3673231b597cfb8bde040ceedc14cd82f6951adf
Konrad Kuchciak [Mon, 13 Jul 2020 07:01:30 +0000 (09:01 +0200)]
i2c: Change i2c test device number from 7 to 13
This patch is related to kernel upgrade (v5.4) on rpi4, which
changes i2c-stub device number from 7 to 13.
Change-Id: Ie079539b5057f4af0afd6cb8ec389364b6a07b90
Konrad Kuchciak [Wed, 8 Jul 2020 10:05:10 +0000 (12:05 +0200)]
Release 0.1.1
Change-Id: I49107ed8e5c3355a6a70892379b58263af1c36d9
Konrad Kuchciak [Wed, 8 Jul 2020 09:23:55 +0000 (11:23 +0200)]
gpio: Setup udev monitor before exporting pin
This will get rid of race condition that may lead to
missing udev event after exporting gpio pin.
Udev event monitor is now created before export.
Change-Id: Ifbad613252243c24cb03ed1765d3d947d244f56a
Konrad Kuchciak [Mon, 6 Jul 2020 11:40:19 +0000 (13:40 +0200)]
Use udev rules to make PWM nodes writable
Change-Id: Iad2bc5d9c43cb6b849f6308232b8ee2e995112ff
Konrad Kuchciak [Wed, 5 Feb 2020 16:43:15 +0000 (17:43 +0100)]
i2c: Fix i2c stub device config for rpi4
On RPi4 SMBus stub driver appears as /dev/i2c-7, not /dev/i2c-4.
Change-Id: I9137d5486e265ce82cde397cfb87de5d54a06079
Karol Lewandowski [Thu, 9 Jan 2020 11:04:09 +0000 (12:04 +0100)]
Adjust codebase for iniparser upgrade (4.x)
Change-Id: I242b62f5dade32085eafa050e208d52edcd40b7b
Karol Lewandowski [Fri, 3 Jan 2020 09:39:17 +0000 (10:39 +0100)]
Fix gcc 9.x compilation issue
Change-Id: Ie1e45dc814630a3fd819c84d1953a9aa75f69e07
wchang kim [Mon, 11 Nov 2019 09:57:14 +0000 (18:57 +0900)]
Adding rpi4 board.
Change-Id: Icc8bb7c0c4ff7eaf0481dfbb8dc0646e5bbd9aa3
Konrad Kuchciak [Mon, 11 Feb 2019 07:09:35 +0000 (08:09 +0100)]
pio: don't close fd if it's value is negative
Additionaly return if fd open failed.
Change-Id: Ica183a00a265a499eb2e09a864062877ef8847fa
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Wed, 5 Sep 2018 09:29:34 +0000 (11:29 +0200)]
adc: open node as O_RDONLY
Change-Id: Ic878259b294fdcc13e8bf66e44ab57db24588930
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Wed, 5 Sep 2018 09:28:07 +0000 (11:28 +0200)]
Revert "udev: apply proper security label to files read by adc module"
Change-Id: I98bd5939554a4173616f0d42dc202be05f4c11e7
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Tue, 4 Sep 2018 04:56:47 +0000 (06:56 +0200)]
udev: apply proper security label to files read by adc module
Change-Id: I0a32f3fd5bf3096ab38ab88a97fc37eab965f6ca
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Konrad Kuchciak [Wed, 18 Jul 2018 10:09:42 +0000 (12:09 +0200)]
Add support for the adc device
Change-Id: Iec76628712a5efc6a00c726b98ebaa6c2e5da966
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Karol Lewandowski [Fri, 13 Jul 2018 11:58:24 +0000 (11:58 +0000)]
Merge "privilege: initialize variables before using" into tizen
Konrad Kuchciak [Wed, 11 Jul 2018 08:47:40 +0000 (10:47 +0200)]
privilege: initialize variables before using
This fixed issues reported by Coverity bot about not checking
values returned by cynara_creds_gdbus_get_client() and
cynara_creds_gdbus_get_user()
Change-Id: I65ae1c2160129d45bb159bc6fc79b622b38390f8
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
Wook Song [Wed, 27 Jun 2018 02:18:32 +0000 (11:18 +0900)]
systemd: Add file existence dependency on /proc/device-tree/model
Since this deamon requires to open /proc/device-tree/model to get the
board model information, the service sometimes failed to start on the
system which does not use device-tree. For example, the system on the
x86-64 architecture does not use device-tree so that this daemon would
fail to be activated on this system. In order to solve this issue, this
patch adds a ConditionPathExists dependency on /proc/device-tree/model
to the systemd unit configuration file.
Change-Id: Ibf1bdfbe3df76a878ff608464907c84351fe35d1
Signed-off-by: Wook Song <wook16.song@samsung.com>
wchang kim [Mon, 25 Jun 2018 08:24:21 +0000 (17:24 +0900)]
Changed the i2c information of eagleye.
Change-Id: I1ba0089f4542f910e4b49067237944b2c458aca8
wchang kim [Thu, 21 Jun 2018 07:00:49 +0000 (16:00 +0900)]
Adding a board of eagleye530s
Change-Id: I4a894a34452c90f734f2fcca668f604359d36621
wchang kim [Thu, 21 Jun 2018 00:13:17 +0000 (09:13 +0900)]
Fixed the file name.
Change-Id: I3108fd13d832e73b33a6c89361bb90d59bffe887
kibak.yoon [Thu, 21 Jun 2018 06:52:28 +0000 (15:52 +0900)]
Add dbus.conf to allow dbus policy
Change-Id: Ib2725ff537bf28fed90b3fc862704d2ba51b1f55
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
kibak.yoon [Thu, 21 Jun 2018 06:57:43 +0000 (15:57 +0900)]
Revert "Add dbus.conf to allow dbus policy"
This reverts commit
b54ae48c4c1a5501c3a544b6b1a65254738885a6.
kibak.yoon [Thu, 21 Jun 2018 06:52:28 +0000 (15:52 +0900)]
Add dbus.conf to allow dbus policy
Change-Id: Ib2725ff537bf28fed90b3fc862704d2ba51b1f55
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 2 Jan 2018 10:09:04 +0000 (19:09 +0900)]
pio: close fd when it is not negative number
Change-Id: I8c6b2f497ce0c519f6dbdb29150edb313b274951
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 2 Jan 2018 03:10:05 +0000 (12:10 +0900)]
pio: assign null to handle if open is failed
- To prevent "use after free", NULL should assign to the handle.
Change-Id: I974442074cb778d3f2e9797bc291b9098f3017f5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Mon, 18 Dec 2017 07:58:17 +0000 (16:58 +0900)]
udev: change security label
- when receiving fd to lib from daemon, the kernel blocks fd by security check.
- change 90-gpio.rules name to 90-peripheral-io.rules
Change-Id: I5c75056e4d54fb667e6acdc7398f5f35ae9a3ff3
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Fri, 8 Dec 2017 05:59:35 +0000 (14:59 +0900)]
handle: do not management fd in handle
- create a fd list in the interface files
- Do not need to have fd until Lib request to close
Change-Id: I758edbf9f0d5007bb74926a37c5d8ba3e858936d
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 7 Dec 2017 08:11:31 +0000 (08:11 +0000)]
Merge "gdbus: communicate via gdbus when close" into tizen
Segwon [Wed, 6 Dec 2017 07:18:54 +0000 (16:18 +0900)]
gdbus: communicate via gdbus when close
- in the past, when Lib was closed, gdbus disconnected and the daemon received a disconnection callback.
- the problem is gdbus disconnection callback is called late
- if App repeat open and close, daemon get the problem of handling open before close is processed.
Change-Id: If358b283389eebc5dfe97f6c182defef37acfce4
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 5 Dec 2017 01:42:09 +0000 (10:42 +0900)]
privilege: do not compare the return value of cynara_check() with the wrong value
Change-Id: I8876914aef668d25d6f3e0e3f65910d37ad8ac74
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 23 Nov 2017 13:11:06 +0000 (22:11 +0900)]
[5/5] fd passing: make fd list and send it to Lib
Change-Id: Ie76575d1357035abbb32d7af1f9e61d6a5c32c39
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 23 Nov 2017 09:21:44 +0000 (18:21 +0900)]
gdbus: change function prefix "handle" to "peripheral_gdbus"
Change-Id: I178b507d5437ffdbb756e3067418286c20edbbcf
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 23 Nov 2017 09:16:35 +0000 (18:16 +0900)]
handle: move duplicate header files to peripheral_handle_common.h
Change-Id: Ie2fa4143030b743ee85f4a15ed89c77d826098d5
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 23 Nov 2017 09:06:47 +0000 (18:06 +0900)]
handle: add fd values to handle and add interface function
Change-Id: I910023125072b2b3660cbf8d0e5974afabda2a73
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Fri, 24 Nov 2017 04:37:19 +0000 (04:37 +0000)]
Merge "handle: change structs name in peripheral_handle.h" into tizen
Segwon [Fri, 24 Nov 2017 04:37:13 +0000 (04:37 +0000)]
Merge "handle: change the handle function name appropriately" into tizen
Segwon [Fri, 24 Nov 2017 04:37:08 +0000 (04:37 +0000)]
Merge "interface: move gpio_wait_for_udev() into peripheral_interface_gpio_open()" into tizen
Segwon [Thu, 23 Nov 2017 02:46:58 +0000 (11:46 +0900)]
handle: change structs name in peripheral_handle.h
- remove the unused handle and type
- peripheral_bus_s -> peripheral_info_s
- peripheral_bus_gpio_s -> peripheral_handle_gpio_s
- peripheral_bus_i2c_s -> peripheral_handle_i2c_s
- peripheral_bus_pwm_s -> peripheral_handle_pwm_s
- peripheral_bus_uart_s -> peripheral_handle_uart_s
- peripheral_bus_spi_s -> peripheral_spi_s
- peripheral_bus_data_s -> peripheral_handle_s
Change-Id: I6605071a201eb6e1b508c7d43ac37c27c1ece7fe
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 23 Nov 2017 02:07:23 +0000 (11:07 +0900)]
handle: change the handle function name appropriately
- change prefix "bus" to "handle"
Change-Id: I0d3232c8483f7cd7ed3ffff1470517bbfda29b10
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Thu, 23 Nov 2017 01:30:37 +0000 (10:30 +0900)]
interface: move gpio_wait_for_udev() into peripheral_interface_gpio_open()
Change-Id: Iaf6ca8c0d9ed435b312cf750ab7bcb579159c5c8
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 08:28:15 +0000 (17:28 +0900)]
etc: #ifndef string constants name change to file name
Change-Id: I86af8a90f9a76e7ee0e937fe2b5720ff5d3d4d1f
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 08:18:40 +0000 (17:18 +0900)]
[4/5] fd passing: can get fd from interface file
- GPIO/PWM : open -> get fd -> close
- I2C/UART/SPI : get fd(open) -> close
Change-Id: I117748c24eeef0c65d007114a5228e999ce6168a
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 22 Nov 2017 02:42:58 +0000 (11:42 +0900)]
interface: change ERROR_CHECK macro to IF_ERROR_RETURN
- input function parameter and run function before return
Change-Id: I119be474d5b96b5b40aa40956b76092c80667fd0
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 05:45:33 +0000 (14:45 +0900)]
util: move board, log, privilege file into util directory
- prefix match with "peripheral"
Change-Id: Iddb98ac81212712deeb3896c5c39fecf1df220e3
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 06:44:41 +0000 (15:44 +0900)]
board: do not free a value obtained by a iniparser_getseckeys()
- reference : http://ndevilla.free.fr/iniparser/html/iniparser_8h.html#
afa12556355442c567c4b123446f3b309
This function queries a dictionary and finds all keys in a given section.
Each pointer in the returned char pointer-to-pointer is pointing to a string allocated in the dictionary
do not free or modify them.
This function returns NULL in case of error.
Change-Id: I62b1e0496aa4faabaf8cbfe11fa5ebfa9ebf33aa
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 05:24:50 +0000 (14:24 +0900)]
handle: change file name "peripheral_bus.h" to "peripheral_handle.h"
Change-Id: I1d65506dd9601ece9b685ee388332d484da26c24
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 05:08:00 +0000 (14:08 +0900)]
handle : change file name "peripheral_bus_util" to peripheral_handle_common"
- remove unused function in this file
- move into handle directory
Change-Id: Ie2bfdeab0def13a5c247b032b8ff448f659fe8b5
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 04:52:27 +0000 (13:52 +0900)]
privilege: move peripheral_bus_check_privilege() to privilege_checker.h
- change name : peripheral_bus_check_privilege() -> peripheral_privilege_check()
Change-Id: I670e346d59ccd7fd8f51707c76268dc0a7c117fc
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 02:41:43 +0000 (11:41 +0900)]
directory: change directory
- remove daemon
- add src/handle
- add inc/handle
- add src/gdbus
- add inc/gdbus
- add inc/interface
Change-Id: I925816afe27ec9804fb77a056706e72f65623442
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 04:06:56 +0000 (13:06 +0900)]
interface: close the fd before call CHECK_ERROR if it need to close fd
Change-Id: I791e969c63da3c114f08ecdb3dbb303f9239dfb1
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 02:33:51 +0000 (11:33 +0900)]
gdbus: change file name prefix "peripheral_bus_gdbus" to "peripheral_gdbus"
Change-Id: I155f9155a39745093e553eb2830a7b1198515469
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 01:54:34 +0000 (10:54 +0900)]
handle: change file name that generates the handle
- change prefix "peripheral_bus" to "peripheral_handle"
Change-Id: I5860b15baf18138397b445472c05bd20873f6382
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 01:46:52 +0000 (10:46 +0900)]
log: change file name "peripheral_common.h" to "peripheral_log.h"
Change-Id: I4cbf8be541b34d592b95c47d2a9a975935b65a95
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 01:37:37 +0000 (10:37 +0900)]
interface: create file the "peripheral_inteface_common.h"
- change the errno check to macro
- move common included header files to peripheral_interface_common.h
- move common constants to peripheral_interface_common.h
Change-Id: I1a4b6fea351a045b829fb122bcec9d80f1e3ac7d
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 21 Nov 2017 01:17:27 +0000 (10:17 +0900)]
interface: add prefix "peripheral_interface" to interface file name
Change-Id: I9217d313406d113f0e314609d01edd577e9940c9
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 20 Nov 2017 11:15:41 +0000 (20:15 +0900)]
handle: remove unnecessary members in handle.
Change-Id: If0ff8eae0df81f5bdd84997c69bb48ea9b121ff0
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 20 Nov 2017 11:04:56 +0000 (20:04 +0900)]
[3/5] fd passing: remove unnecessary functions moved to Lib
- I/O patch: https://review.tizen.org/gerrit/#/c/159779/
Change-Id: Ie297b0400b48f1fb17e9a3500fb94a928c1bc2b0
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 20 Nov 2017 09:02:55 +0000 (18:02 +0900)]
privilege: change the "peripheral_bus_check_privilege" function static to public.
- Use the peripheral_bus_check_privilege() directly in the gdbus function rather than in the peripheral_bus_get_client_info().
- The ids generated by peripheral_bus_get_client_info() will not be used.
Change-Id: I8ec7536f04c1db069b31c8ac973d727e12ba7f0e
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 20 Nov 2017 08:39:44 +0000 (17:39 +0900)]
[2/5] fd passing: include fd list in gdbus open function
Change-Id: I6a5b6c42940f4dd903bd0479fe1ed287923c5348
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 20 Nov 2017 08:27:30 +0000 (17:27 +0900)]
[1/5] fd passing: do not communicate with Lib from gdbus except for the open.
Change-Id: Idf4dddf501f2c14c1a28d8a27d4354ac3ad9cd8d
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Mon, 20 Nov 2017 05:06:23 +0000 (14:06 +0900)]
gdbus: do not include peripheral_gdbus.h removed from Lib
- I/O patch : https://review.tizen.org/gerrit/#/c/160409/
Change-Id: Ifb921dcd9aaffc48b042f2e82e38d07fe1acc2ec
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Wed, 15 Nov 2017 10:21:13 +0000 (19:21 +0900)]
spec: remove unnecessary code about systemctl
Change-Id: I1890e58f71babdfc3384a5e7c065f9a37f870015
Signed-off-by: Segwon <segwon.han@samsung.com>
kibak.yoon [Tue, 17 Oct 2017 16:21:09 +0000 (01:21 +0900)]
pio: check if the client has privilege
Change-Id: I6cdd412fe8f17001717e68e13eccbb60fc16fd70
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 16 Oct 2017 09:50:23 +0000 (18:50 +0900)]
pio: fix memory leak
- Overwriting key_list in key_list = iniparser_getseckeys(dict, section)
leaks the storage that key_list points to.
Change-Id: Ia1aefe750ff8addfd40c6372a2720e5515289a8e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Mon, 16 Oct 2017 01:38:49 +0000 (10:38 +0900)]
ini: fixed to wrong ini file for rpi3
- missed the GPIO23 pin
- wrong pin mapping with pin index
Change-Id: If1d76fe6ff050071bef07c6f51bdccb8ee7826a2
Signed-off-by: Segwon <segwon.han@samsung.com>
kibak.yoon [Wed, 6 Sep 2017 10:29:56 +0000 (19:29 +0900)]
i2c: try to call ioctl() to test i2c-stub when read()/write() is failed
Change-Id: Idadb56f4da5b4ed17fef47ba316524462b0c50c5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Thu, 12 Oct 2017 03:08:49 +0000 (12:08 +0900)]
board: fixed to not be an unterminated array.
Change-Id: If0c6aeb1a1d36392aff13f1a6564e625fbfc9cf0
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 10 Oct 2017 12:52:47 +0000 (21:52 +0900)]
board: fixed allocated memory released via iniparser_getseckeys()
Change-Id: I49542c1e79e83aa8ad278eca23d89c78a44cd55f
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 10 Oct 2017 12:25:12 +0000 (21:25 +0900)]
board: increased the memory size because of unterminated string occurred.
Change-Id: I5839e07b77eda7cab197248ba146bc9226573c5c
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 10 Oct 2017 10:02:24 +0000 (19:02 +0900)]
board: meaningful return value is assigned to a variable like read()
Change-Id: I07e1db5b35cc071b4d28f9aac4f685c714e8edb2
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 10 Oct 2017 09:15:13 +0000 (18:15 +0900)]
spi: modified to the rx and tx buffers are not allocated when buffer size is zero.
Change-Id: Ibaca59a040935701078140ca04eeef5dc3fb5280
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 10 Oct 2017 08:53:32 +0000 (17:53 +0900)]
spi: fixed to invalid NULL check when tx_buf allocates.
Change-Id: Ieb4e22cf35d685895960b26d25cd803bc702d67a
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 10 Oct 2017 07:26:13 +0000 (16:26 +0900)]
open handle: open function flow was matched.
- added the NULL check when trying to allocate memory for i2c handle.
- modified to return an OUT_OF_MEMORY when failed allocation from peripheral_bus_data_new().
- open i2c, uart handle flow was matched with another open flow.
- add log before return error.
Change-Id: Ibcee972e2bba39cc42b8bc53bd91efcb0526b0bf
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 10 Oct 2017 10:38:42 +0000 (19:38 +0900)]
i2c: fixed that allocated memory is released when an error occurs.
Change-Id: Ib2c6589ad52b3752297bf6579527b574dba3b3d6
Signed-off-by: Segwon <segwon.han@samsung.com>
Segwon [Tue, 10 Oct 2017 10:35:16 +0000 (19:35 +0900)]
bus: fixed a flow using a handle already freed.
Change-Id: Ie3596fa2db1e607d15d0c3745a872a5d4c3f067d
Signed-off-by: Segwon <segwon.han@samsung.com>
kibak.yoon [Tue, 26 Sep 2017 02:07:08 +0000 (11:07 +0900)]
version up 0.1.0
Change-Id: I92d08b747a243c850df8027e5b35bbe1602384bd
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Thu, 21 Sep 2017 08:45:48 +0000 (17:45 +0900)]
uart: fixed to return the -EAGAIN error type when read/write.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I726000397abcac13cfc571336823775c8df1e053
Segwon [Thu, 21 Sep 2017 08:43:06 +0000 (17:43 +0900)]
uart: added flush logic before close.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I639ade4199c50518974b7a5f94c2752677d144b5
Segwon [Thu, 21 Sep 2017 08:38:17 +0000 (17:38 +0900)]
name: sync functions name with changed apis name.
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I093f4eb46c396d91de3caab7a97571f34dd0d79a
Segwon [Thu, 21 Sep 2017 07:52:34 +0000 (16:52 +0900)]
adc: the adc interface is not supported
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: Ief5428879d64020875d0fb4c281c1e82e5d9cb7a
kibak.yoon [Tue, 12 Sep 2017 07:15:13 +0000 (16:15 +0900)]
spi: fix bug by passing value instead of pointer as parameter
Change-Id: Ifa2991a34ad1b9f150913cd45ca8719fe1760b62
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Segwon [Fri, 8 Sep 2017 02:07:25 +0000 (11:07 +0900)]
util: added to the NULL check.
- SVACE : 279879, DEREF_OF_NULL.RET.PROC.STAT
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I0ac9861b1afabc52ccd29c125f245414688d7c1c
kibak.yoon [Wed, 6 Sep 2017 08:12:02 +0000 (17:12 +0900)]
spi: transfer the tx/rx data with the same structure variable
- Tested with ADC(MCP3008)
- The name of spi_read_write() function will be changed to "spi_transfer()".
Change-Id: I6db7383854de46c5e45721fb9ec9da6ce4a51c8f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 28 Aug 2017 12:38:31 +0000 (21:38 +0900)]
board-config: add config file for Artik 520
- Artik 520 Pin Mapping
https://developer.artik.io/documentation/developer-guide/gpio/gpio-mapping.html#artik-520-pin-mapping
- Artik 520 Datasheet
https://developer.artik.io/documentation/downloads.html#ds
[TODO]
- more testing is needed for GPIO
Change-Id: I2e8ce87b03a410379841be820f918f02c42d8f20
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 28 Aug 2017 12:37:21 +0000 (21:37 +0900)]
board-config: fix typo from "unkown" to "unknown"
- the config file name is not matched because there is a typo("unkown").
so it is failing to load the config file on the unknown device(e.g., artik520).
- Even if this patch is merged, the peripheral bus daemon will not boot properly.
This is because there is no peripheral-io item in the config file...
Change-Id: I7e96467304ef8742c30205d51447ff76b35b1713
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Hyeongsik Min [Fri, 28 Jul 2017 06:46:21 +0000 (15:46 +0900)]
Improve logs for I2C communication
- Show I2C slave address in hexadecimal.
- Add logs in peripheral_bus_i2c to provide information about the slave
address of failed device.
Change-Id: Idc29f0cf6a52f67c849bd9dac064210203c1a192
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
Hyeongsik Min [Fri, 28 Jul 2017 04:51:46 +0000 (13:51 +0900)]
Refactor logs messages in i2c/spi interface
- Print message if fd is invalid.
- Show fd number in error case.
Change-Id: If08d70d1a4465ecbb6a5cf29b77674c18debe5d0
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
Hyeongsik Min [Mon, 24 Jul 2017 02:15:12 +0000 (11:15 +0900)]
Print log messages in case of wrong write access
Writing value is not permitted when the pin is in input direction mode.
Just in case, this patch fixes error number and adds log message to let user
know the cause.
Change-Id: Ie40fabeba06b832eaa0585130af8702ba8fcb8b5
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
Sungguk Na [Fri, 21 Jul 2017 07:15:41 +0000 (16:15 +0900)]
Refactoring dbus interface functions
Change-Id: Ide717e39235e5b87583e93dfd05485efc59e9a3b
Signed-off-by: Sungguk Na <sungguk.na@samsung.com>
Sungguk Na [Fri, 21 Jul 2017 02:05:55 +0000 (11:05 +0900)]
Fix bug at spi open
Change-Id: I3133d1eb66cc2f621f85ba9601dfcf34b02014d2
Signed-off-by: Sungguk Na <sungguk.na@samsung.com>
jino.cho [Wed, 19 Jul 2017 11:42:01 +0000 (20:42 +0900)]
package version up to 0.0.6
Change-Id: Id491bcae11e34a686c65eb7b524532f4098ddf42
Signed-off-by: jino.cho <jino.cho@samsung.com>
Hyeongsik Min [Wed, 19 Jul 2017 08:07:38 +0000 (17:07 +0900)]
Fix model name of RPI3
As model name in dtb of RPI3 has been changed, there is a issue that
peripheral-bus failed to recognize the RPI3 board. This patch removes
"Rev 1.2" from lookup string for RPI3 to solve the issue.
Change-Id: If7e2c9b5f83a6bf29c743d19ae7eae3095761934
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
Hyeongsik Min [Thu, 13 Jul 2017 07:57:01 +0000 (16:57 +0900)]
Move header files in daemon/ to include directory
Change-Id: Id8b9aa2e16fc9b604988075613aa53318e13883e
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
Hyeongsik Min [Fri, 14 Jul 2017 09:36:49 +0000 (18:36 +0900)]
Remove unnecessary condition check in uart.c
bytesize is always greater than zero.
Change-Id: Iae6a882a8cb1fcaee215602ef7d8dccafa2af99d
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
Hyeongsik Min [Fri, 14 Jul 2017 01:17:18 +0000 (10:17 +0900)]
Enable support of several gpio pins for RPI3
Change-Id: I98dbcc336e34fe22712e02177f4756c432652e09
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>