[Pdbg] [PATCH v2] main: Set I2C backend device specified in arguments

Amitay Isaacs amitay at ozlabs.org
Thu Jan 31 13:20:02 AEDT 2019


Reviewed-by: Amitay Isaacs <amitay at ozlabs.org>

On Wed, 2019-01-30 at 10:19 +0300, Artem Senichev wrote:
> Restores the functionality that allows to set I2C backend
> device through command line arguments, it was broken by commit
> dacc9b57e4615f125eb1f56d842a64c40abb1408
> 
> Signed-off-by: Artem Senichev <artemsen at gmail.com>
> ---
>  src/main.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/main.c b/src/main.c
> index 22e74a5..d5f9385 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -532,6 +532,14 @@ static bool target_selection(void)
>  #ifdef TARGET_ARM
>  	case I2C:
>  		pdbg_targets_init(&_binary_p8_i2c_dtb_o_start);
> +		/* Set device for I2C backend */
> +		if (device_node) {
> +			struct pdbg_target *pib;
> +			const size_t len = strlen(device_node) + 1 /*
> include last null */;
> +			pdbg_for_each_class_target("pib", pib) {
> +				pdbg_target_set_property(pib, "bus",
> device_node, len);
> +			}
> +		}
>  		break;
>  
>  	case FSI:
> -- 
> 2.20.1
> 

Amitay.
-- 

You are free the moment you do not look outside yourself for someone to solve
your problems.



More information about the Pdbg mailing list