platform/core/system/peripheral-bus.git
7 years agoFix gdbus name and path 06/128306/1
Hyeongsik Min [Mon, 8 May 2017 12:44:17 +0000 (21:44 +0900)]
Fix gdbus name and path

This change fixes macro name along with the change in peripheal-io.

Change-Id: Ifd6f03126e1dabd6488172268d557c8c1da93caa
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoFix static analysis issue 58/128258/2 accepted/tizen/unified/20170510.013102 submit/tizen/20170508.093623 tizen_4.0.m1_release
Hyeongsik Min [Mon, 8 May 2017 07:57:34 +0000 (16:57 +0900)]
Fix static analysis issue

- UNREACHABLE_CODE at peripheral_bus_gpio.c:254
- INTEGER_OVERFLOW in adc_get_device_name()
  This patch makes the function allocate buffer for the name of adc device
  node instead of just copying strings to buffer passed through argument.

Change-Id: If5d137a846ca5727b3d2cb00f4a2b6d313abf75f
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoFix build break on 64 bit architecture 57/128257/1
Hyeongsik Min [Mon, 8 May 2017 07:39:38 +0000 (16:39 +0900)]
Fix build break on 64 bit architecture

Change-Id: Ief79422f096a31447dc79068d1128594f4129e95
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoAdd structure to store i2c client context 27/128127/2 submit/tizen/20170508.033648
Hyeongsik Min [Sun, 7 May 2017 09:31:29 +0000 (18:31 +0900)]
Add structure to store i2c client context

- Add access control based on the client's bus name.
- Change argument name and type of i2c gdbus method.

Change-Id: I2d81181b41cc35ca34c71fefcf2beb8af0bc92ce
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoFix svace issue in gpio interface 78/128078/3
Hyeongsik Min [Fri, 5 May 2017 01:57:42 +0000 (10:57 +0900)]
Fix svace issue in gpio interface

- DEREF_AFTER_NULL.EX in peripheral_bus_gpio_open.
  Null pointer is dereferenced after peripherl_bus_gpio_data_new returns null.
- UNREACHABLE_CODE in peripheral_bus_gpio_register_irq().
  gpio->io_id will be zero if it failed and cannot be less than zero.

Change-Id: Ic780ba4362ef13273c3cb2f367ad13276ea429c5
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoFix svace issue in i2c interface 77/128077/2
Hyeongsik Min [Fri, 5 May 2017 01:30:05 +0000 (10:30 +0900)]
Fix svace issue in i2c interface

- Fix UNREACHABLE_CODE in i2c_open
- Add exception handling code in i2c_close
- Pass return value of ioctl in i2c_set_address

Change-Id: I5c8483948bb107034f116c47756231d7a09de57a
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoMake all warnings into errors 01/127901/1
Hyeongsik Min [Tue, 2 May 2017 07:47:17 +0000 (16:47 +0900)]
Make all warnings into errors

And removed unused variable in CMakeLists

Change-Id: I87ed0410f245b5a2391cf8f3c9fc96d669233777
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoPut i2c/pwm_skeleton variable to pb_data 00/127900/1
Hyeongsik Min [Mon, 1 May 2017 11:21:09 +0000 (20:21 +0900)]
Put i2c/pwm_skeleton variable to pb_data

Change-Id: I7f55e22e159e705cafc2a952b8877ea0d5b8b3b7
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoSupport gpio interrupt 41/127641/4
jino.cho [Tue, 18 Apr 2017 07:29:27 +0000 (16:29 +0900)]
Support gpio interrupt

The gpio interrupt should work properly if the patch for
peripheral-io is applied together.

Change-Id: I0bf71501b54728ad0ce83a623e084bf8227b3e9a
Signed-off-by: jino.cho <jino.cho@samsung.com>
7 years agoFix logic in gpio_write and gpio_get_direction 10/127210/2
Hyeongsik Min [Wed, 26 Apr 2017 11:31:03 +0000 (20:31 +0900)]
Fix logic in gpio_write and gpio_get_direction

- Return error if direction is input mode
- Update direction state along with input value

Change-Id: I360df5a6c986defaf25a71cf3a47785854b3c9a3
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoUpdate package version to 0.0.3 93/127093/1 accepted/tizen/unified/20170426.200825 submit/tizen/20170426.072552 submit/tizen/20170426.072600
Hyeongsik Min [Wed, 26 Apr 2017 07:12:15 +0000 (16:12 +0900)]
Update package version to 0.0.3

Change-Id: I599f04c285d7e142b9dfbb31efdc03f82e1ca8eb
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoRemove i2c_set_address() API 10/126810/3
Hyeongsik Min [Tue, 25 Apr 2017 05:53:38 +0000 (14:53 +0900)]
Remove i2c_set_address() API

i2c_open() will pass bus and address argument together.

Change-Id: Iedd94d1554bc17764f64b1d31ca6e8c10ad87111
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoPass pb_data to callbacks of gpio methods 46/127046/3
jino.cho [Wed, 26 Apr 2017 02:34:17 +0000 (11:34 +0900)]
Pass pb_data to callbacks of gpio methods

Previous commit missed adding pb_data to argument.
This commit fix crash issue due to the missing.

Change-Id: I75d3cffe6a09c72b6976d5581e22153866479f1b
Signed-off-by: jino.cho <jino.cho@samsung.com>
7 years agoAdd gpio instance managing 33/126933/4
jino.cho [Tue, 25 Apr 2017 09:30:29 +0000 (18:30 +0900)]
Add gpio instance managing

Change-Id: I3c9e273de2fa8c28c7f1bbcb48afe61dc5598af8
Signed-off-by: jino.cho <jino.cho@samsung.com>
7 years agoChange argument name in i2c interface 09/126809/1
Hyeongsik Min [Tue, 25 Apr 2017 05:51:14 +0000 (14:51 +0900)]
Change argument name in i2c interface

- Change file_hndl to fd
- Remove commented out codes in i2c.c
- Change log message format in i2c.c

Change-Id: If64e0fdd54f91eda232095693056044fb82b7502
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoFix gdbus interface prefix and typo 23/126523/2
Hyeongsik Min [Mon, 24 Apr 2017 04:09:35 +0000 (13:09 +0900)]
Fix gdbus interface prefix and typo

Removed 'system.' from interface name.

Change-Id: I864efa355360709cb31a77390b4cad039e00ef16
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoChange gdbus interface with gdbus-codegen 36/126436/6
Sungguk Na [Fri, 21 Apr 2017 10:47:27 +0000 (19:47 +0900)]
Change gdbus interface with gdbus-codegen

Change-Id: I568508456be8326ff95385a2839691ebd791f86b
Signed-off-by: Sungguk Na <sungguk.na@samsung.com>
7 years agoRemove exception handling in gpio_open() 55/126155/3
jino.cho [Thu, 20 Apr 2017 08:50:03 +0000 (17:50 +0900)]
Remove exception handling in gpio_open()

Calling the gpio_close as a exception handling code in gpio_open()
was removed.

Change-Id: I9fb886d051aabd12b5222e37916c04ac5c464f36
Signed-off-by: jino.cho <jino.cho@samsung.com>
7 years agoFix wrong log message in gpio_close 48/126148/2
jino.cho [Thu, 20 Apr 2017 08:23:26 +0000 (17:23 +0900)]
Fix wrong log message in gpio_close

Change-Id: Iec45696b851495fe2e95060c63ae0f6441dc92ab
Signed-off-by: jino.cho <jino.cho@samsung.com>
7 years agoRename peripheral_i2c_context_h to peripheral_i2c_h 32/126032/2
Hyeongsik Min [Wed, 19 Apr 2017 10:55:22 +0000 (19:55 +0900)]
Rename peripheral_i2c_context_h to peripheral_i2c_h

Change-Id: Id304caf9e1de0a07d90a8279e7aa03ebaf746234
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoMove global variables to periheral_bus_s structure 71/125671/4
jino.cho [Tue, 18 Apr 2017 09:37:40 +0000 (18:37 +0900)]
Move global variables to periheral_bus_s structure

This patch adds periheral_bus_s structure type to gather global
variables into it.

Change-Id: If90c0f09deca9ca81438441d37e8024878bf715c
Signed-off-by: jino.cho <jino.cho@samsung.com>
7 years agoRemove i2c_set_frequency interface 50/125650/1
Hyeongsik Min [Tue, 18 Apr 2017 07:57:44 +0000 (16:57 +0900)]
Remove i2c_set_frequency interface

As ioctl for frequency setting is not defined in kernel, remove the
function and related enum type.

Change-Id: I3031b01e65995029251b6f33a1285ecffe66d58f
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
7 years agoRearrange the order of gpio interface functions 30/125630/3
jino.cho [Tue, 18 Apr 2017 07:03:26 +0000 (16:03 +0900)]
Rearrange the order of gpio interface functions

Change-Id: I6259f6a387cab92d7fec91ff48b5db76e0441ff1
Signed-off-by: jino.cho <jino.cho@samsung.com>
7 years agoImport source codes from iotbus 47/125547/2
jino.cho [Tue, 18 Apr 2017 03:37:53 +0000 (12:37 +0900)]
Import source codes from iotbus

- Import server source codes from below
  https://github.com/tizen-artik/iotbus

- Fix coding style and Svace issues
- Fix build warnings and clean up codes
- Rename peripheral_server to peripheral_bus

Change-Id: Ic6918f28cc8055f6a4cacba4c94ec45247e9b959
Signed-off-by: jino.cho <jino.cho@samsung.com>
7 years agoInitial empty repository master
Tizen Infrastructure [Mon, 17 Apr 2017 04:12:45 +0000 (21:12 -0700)]
Initial empty repository