Lines Matching +full:write +full:- +full:protected

4  * SPDX-License-Identifier: Apache-2.0
38 struct flash_priv *priv = dev->data; in flash_cc13xx_cc26xx_init()
40 k_sem_init(&priv->mutex, 1, 1); in flash_cc13xx_cc26xx_init()
89 * After write protecting a sector this sector can only be set back in flash_cc13xx_cc26xx_range_protected()
92 * Return early if any of sectors from requested range is protected. in flash_cc13xx_cc26xx_range_protected()
108 struct flash_priv *priv = dev->data; in flash_cc13xx_cc26xx_erase()
121 return -EINVAL; in flash_cc13xx_cc26xx_erase()
125 return -EINVAL; in flash_cc13xx_cc26xx_erase()
128 if (k_sem_take(&priv->mutex, K_FOREVER)) { in flash_cc13xx_cc26xx_erase()
129 return -EACCES; in flash_cc13xx_cc26xx_erase()
137 * During a FLASH memory write or erase operation, the FLASH memory in flash_cc13xx_cc26xx_erase()
151 rc = -EIO; in flash_cc13xx_cc26xx_erase()
160 k_sem_give(&priv->mutex); in flash_cc13xx_cc26xx_erase()
171 size_t len = MIN(size - i, WRITE_BUFFER_LEN); in flash_cc13xx_cc26xx_buffered_write()
176 rc = -EIO; in flash_cc13xx_cc26xx_buffered_write()
188 struct flash_priv *priv = dev->data; in flash_cc13xx_cc26xx_write()
198 return -EINVAL; in flash_cc13xx_cc26xx_write()
202 return -EINVAL; in flash_cc13xx_cc26xx_write()
206 return -EINVAL; in flash_cc13xx_cc26xx_write()
209 if (k_sem_take(&priv->mutex, K_FOREVER)) { in flash_cc13xx_cc26xx_write()
210 return -EACCES; in flash_cc13xx_cc26xx_write()
233 rc = -EIO; in flash_cc13xx_cc26xx_write()
241 k_sem_give(&priv->mutex); in flash_cc13xx_cc26xx_write()
256 return -EINVAL; in flash_cc13xx_cc26xx_read()
260 return -EINVAL; in flash_cc13xx_cc26xx_read()
293 .write = flash_cc13xx_cc26xx_write,