Loading drivers/char/adsprpc.c +5 −0 Original line number Diff line number Diff line Loading @@ -470,6 +470,7 @@ struct fastrpc_file { struct mutex perf_mutex; struct pm_qos_request pm_qos_req; int qos_request; struct mutex pm_qos_mutex; struct mutex map_mutex; struct mutex internal_map_mutex; /* Identifies the device (MINOR_NUM_DEV / MINOR_NUM_SECURE_DEV) */ Loading Loading @@ -3721,6 +3722,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl) mutex_unlock(&fl->perf_mutex); mutex_destroy(&fl->perf_mutex); mutex_destroy(&fl->map_mutex); mutex_destroy(&fl->pm_qos_mutex); mutex_destroy(&fl->internal_map_mutex); kfree(fl); return 0; Loading Loading @@ -4085,6 +4087,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) hlist_add_head(&fl->hn, &me->drivers); spin_unlock(&me->hlock); mutex_init(&fl->perf_mutex); mutex_init(&fl->pm_qos_mutex); return 0; } Loading Loading @@ -4211,6 +4214,7 @@ static int fastrpc_internal_control(struct fastrpc_file *fl, fl->pm_qos_req.type = PM_QOS_REQ_AFFINE_CORES; cpumask_copy(&fl->pm_qos_req.cpus_affine, &mask); mutex_lock(&fl->pm_qos_mutex); if (!fl->qos_request) { pm_qos_add_request(&fl->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, latency); Loading @@ -4218,6 +4222,7 @@ static int fastrpc_internal_control(struct fastrpc_file *fl, } else pm_qos_update_request(&fl->pm_qos_req, latency); mutex_unlock(&fl->pm_qos_mutex); /* Ensure CPU feature map updated to DSP for early WakeUp */ fastrpc_send_cpuinfo_to_dsp(fl); break; Loading drivers/power/supply/qcom/smb5-lib.c +10 −0 Original line number Diff line number Diff line Loading @@ -3970,15 +3970,24 @@ static int smblib_get_prop_ufp_mode(struct smb_charger *chg) } smblib_dbg(chg, PR_REGISTER, "TYPE_C_STATUS_1 = 0x%02x\n", stat); /* config 0x154A to 0x17 */ if (stat &(SNK_RP_STD_DAM_BIT | SNK_RP_1P5_DAM_BIT | SNK_RP_3P0_DAM_BIT)){ smblib_masked_write(chg, TYPE_C_DEBUG_ACCESS_SINK_REG,TYPEC_DEBUG_ACCESS_SINK_MASK,0x17); } switch (stat & DETECTED_SRC_TYPE_MASK) { case SNK_RP_STD_BIT: case SNK_RP_STD_DAM_BIT: return POWER_SUPPLY_TYPEC_SOURCE_DEFAULT; case SNK_RP_1P5_BIT: case SNK_RP_1P5_DAM_BIT: return POWER_SUPPLY_TYPEC_SOURCE_MEDIUM; case SNK_RP_3P0_BIT: case SNK_RP_3P0_DAM_BIT: return POWER_SUPPLY_TYPEC_SOURCE_HIGH; case SNK_RP_SHORT_BIT: return POWER_SUPPLY_TYPEC_NON_COMPLIANT; /* case SNK_DAM_500MA_BIT: case SNK_DAM_1500MA_BIT: case SNK_DAM_3000MA_BIT: Loading @@ -3987,6 +3996,7 @@ static int smblib_get_prop_ufp_mode(struct smb_charger *chg) #else return POWER_SUPPLY_TYPEC_SINK_DEBUG_ACCESSORY; #endif */ default: break; } Loading drivers/power/supply/qcom/smb5-reg.h +10 −0 Original line number Diff line number Diff line Loading @@ -337,7 +337,17 @@ enum { * TYPEC Peripheral Registers * ********************************/ #define TYPE_C_SNK_STATUS_REG (TYPEC_BASE + 0x06) #define DETECTED_SRC_TYPE_MASK GENMASK(6, 0) #define SNK_RP_STD_DAM_BIT BIT(6) #define SNK_RP_1P5_DAM_BIT BIT(5) #define SNK_RP_3P0_DAM_BIT BIT(4) #define TYPE_C_DEBUG_ACCESS_SINK_REG (TYPEC_BASE + 0x4A) #define TYPEC_DEBUG_ACCESS_SINK_MASK GENMASK(4, 0) #define SNK_DAM_MASK GENMASK(6, 4) #define SNK_DAM_500MA_BIT BIT(6) #define SNK_DAM_1500MA_BIT BIT(5) Loading drivers/usb/host/max3421-hcd.c +13 −30 Original line number Diff line number Diff line Loading @@ -153,8 +153,6 @@ struct max3421_hcd { */ struct urb *curr_urb; enum scheduling_pass sched_pass; struct usb_device *loaded_dev; /* dev that's loaded into the chip */ int loaded_epnum; /* epnum whose toggles are loaded */ int urb_done; /* > 0 -> no errors, < 0: errno */ size_t curr_len; u8 hien; Loading Loading @@ -492,39 +490,17 @@ max3421_set_speed(struct usb_hcd *hcd, struct usb_device *dev) * Caller must NOT hold HCD spinlock. */ static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, int force_toggles) max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); int old_epnum, same_ep, rcvtog, sndtog; struct usb_device *old_dev; int rcvtog, sndtog; u8 hctl; old_dev = max3421_hcd->loaded_dev; old_epnum = max3421_hcd->loaded_epnum; same_ep = (dev == old_dev && epnum == old_epnum); if (same_ep && !force_toggles) return; if (old_dev && !same_ep) { /* save the old end-points toggles: */ u8 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); rcvtog = (hrsl >> MAX3421_HRSL_RCVTOGRD_BIT) & 1; sndtog = (hrsl >> MAX3421_HRSL_SNDTOGRD_BIT) & 1; /* no locking: HCD (i.e., we) own toggles, don't we? */ usb_settoggle(old_dev, old_epnum, 0, rcvtog); usb_settoggle(old_dev, old_epnum, 1, sndtog); } /* setup new endpoint's toggle bits: */ rcvtog = usb_gettoggle(dev, epnum, 0); sndtog = usb_gettoggle(dev, epnum, 1); hctl = (BIT(rcvtog + MAX3421_HCTL_RCVTOG0_BIT) | BIT(sndtog + MAX3421_HCTL_SNDTOG0_BIT)); max3421_hcd->loaded_epnum = epnum; spi_wr8(hcd, MAX3421_REG_HCTL, hctl); /* Loading @@ -532,7 +508,6 @@ max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, * address-assignment so it's best to just always load the * address whenever the end-point changed/was forced. */ max3421_hcd->loaded_dev = dev; spi_wr8(hcd, MAX3421_REG_PERADDR, dev->devnum); } Loading Loading @@ -667,7 +642,7 @@ max3421_select_and_start_urb(struct usb_hcd *hcd) struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum, force_toggles = 0; int epnum; struct usb_host_endpoint *ep; struct list_head *pos; unsigned long flags; Loading Loading @@ -777,7 +752,6 @@ max3421_select_and_start_urb(struct usb_hcd *hcd) usb_settoggle(urb->dev, epnum, 0, 1); usb_settoggle(urb->dev, epnum, 1, 1); max3421_ep->pkt_state = PKT_STATE_SETUP; force_toggles = 1; } else max3421_ep->pkt_state = PKT_STATE_TRANSFER; } Loading @@ -785,7 +759,7 @@ max3421_select_and_start_urb(struct usb_hcd *hcd) spin_unlock_irqrestore(&max3421_hcd->lock, flags); max3421_ep->last_active = max3421_hcd->frame_number; max3421_set_address(hcd, urb->dev, epnum, force_toggles); max3421_set_address(hcd, urb->dev, epnum); max3421_set_speed(hcd, urb->dev); max3421_next_transfer(hcd, 0); return 1; Loading Loading @@ -1380,6 +1354,15 @@ max3421_urb_done(struct usb_hcd *hcd) status = 0; urb = max3421_hcd->curr_urb; if (urb) { /* save the old end-points toggles: */ u8 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); int rcvtog = (hrsl >> MAX3421_HRSL_RCVTOGRD_BIT) & 1; int sndtog = (hrsl >> MAX3421_HRSL_SNDTOGRD_BIT) & 1; int epnum = usb_endpoint_num(&urb->ep->desc); /* no locking: HCD (i.e., we) own toggles, don't we? */ usb_settoggle(urb->dev, epnum, 0, rcvtog); usb_settoggle(urb->dev, epnum, 1, sndtog); max3421_hcd->curr_urb = NULL; spin_lock_irqsave(&max3421_hcd->lock, flags); usb_hcd_unlink_urb_from_ep(hcd, urb); Loading fs/seq_file.c +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ static void seq_set_overflow(struct seq_file *m) static void *seq_buf_alloc(unsigned long size) { if (unlikely(size > MAX_RW_COUNT)) return NULL; return kvmalloc(size, GFP_KERNEL_ACCOUNT); } Loading Loading
drivers/char/adsprpc.c +5 −0 Original line number Diff line number Diff line Loading @@ -470,6 +470,7 @@ struct fastrpc_file { struct mutex perf_mutex; struct pm_qos_request pm_qos_req; int qos_request; struct mutex pm_qos_mutex; struct mutex map_mutex; struct mutex internal_map_mutex; /* Identifies the device (MINOR_NUM_DEV / MINOR_NUM_SECURE_DEV) */ Loading Loading @@ -3721,6 +3722,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl) mutex_unlock(&fl->perf_mutex); mutex_destroy(&fl->perf_mutex); mutex_destroy(&fl->map_mutex); mutex_destroy(&fl->pm_qos_mutex); mutex_destroy(&fl->internal_map_mutex); kfree(fl); return 0; Loading Loading @@ -4085,6 +4087,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) hlist_add_head(&fl->hn, &me->drivers); spin_unlock(&me->hlock); mutex_init(&fl->perf_mutex); mutex_init(&fl->pm_qos_mutex); return 0; } Loading Loading @@ -4211,6 +4214,7 @@ static int fastrpc_internal_control(struct fastrpc_file *fl, fl->pm_qos_req.type = PM_QOS_REQ_AFFINE_CORES; cpumask_copy(&fl->pm_qos_req.cpus_affine, &mask); mutex_lock(&fl->pm_qos_mutex); if (!fl->qos_request) { pm_qos_add_request(&fl->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, latency); Loading @@ -4218,6 +4222,7 @@ static int fastrpc_internal_control(struct fastrpc_file *fl, } else pm_qos_update_request(&fl->pm_qos_req, latency); mutex_unlock(&fl->pm_qos_mutex); /* Ensure CPU feature map updated to DSP for early WakeUp */ fastrpc_send_cpuinfo_to_dsp(fl); break; Loading
drivers/power/supply/qcom/smb5-lib.c +10 −0 Original line number Diff line number Diff line Loading @@ -3970,15 +3970,24 @@ static int smblib_get_prop_ufp_mode(struct smb_charger *chg) } smblib_dbg(chg, PR_REGISTER, "TYPE_C_STATUS_1 = 0x%02x\n", stat); /* config 0x154A to 0x17 */ if (stat &(SNK_RP_STD_DAM_BIT | SNK_RP_1P5_DAM_BIT | SNK_RP_3P0_DAM_BIT)){ smblib_masked_write(chg, TYPE_C_DEBUG_ACCESS_SINK_REG,TYPEC_DEBUG_ACCESS_SINK_MASK,0x17); } switch (stat & DETECTED_SRC_TYPE_MASK) { case SNK_RP_STD_BIT: case SNK_RP_STD_DAM_BIT: return POWER_SUPPLY_TYPEC_SOURCE_DEFAULT; case SNK_RP_1P5_BIT: case SNK_RP_1P5_DAM_BIT: return POWER_SUPPLY_TYPEC_SOURCE_MEDIUM; case SNK_RP_3P0_BIT: case SNK_RP_3P0_DAM_BIT: return POWER_SUPPLY_TYPEC_SOURCE_HIGH; case SNK_RP_SHORT_BIT: return POWER_SUPPLY_TYPEC_NON_COMPLIANT; /* case SNK_DAM_500MA_BIT: case SNK_DAM_1500MA_BIT: case SNK_DAM_3000MA_BIT: Loading @@ -3987,6 +3996,7 @@ static int smblib_get_prop_ufp_mode(struct smb_charger *chg) #else return POWER_SUPPLY_TYPEC_SINK_DEBUG_ACCESSORY; #endif */ default: break; } Loading
drivers/power/supply/qcom/smb5-reg.h +10 −0 Original line number Diff line number Diff line Loading @@ -337,7 +337,17 @@ enum { * TYPEC Peripheral Registers * ********************************/ #define TYPE_C_SNK_STATUS_REG (TYPEC_BASE + 0x06) #define DETECTED_SRC_TYPE_MASK GENMASK(6, 0) #define SNK_RP_STD_DAM_BIT BIT(6) #define SNK_RP_1P5_DAM_BIT BIT(5) #define SNK_RP_3P0_DAM_BIT BIT(4) #define TYPE_C_DEBUG_ACCESS_SINK_REG (TYPEC_BASE + 0x4A) #define TYPEC_DEBUG_ACCESS_SINK_MASK GENMASK(4, 0) #define SNK_DAM_MASK GENMASK(6, 4) #define SNK_DAM_500MA_BIT BIT(6) #define SNK_DAM_1500MA_BIT BIT(5) Loading
drivers/usb/host/max3421-hcd.c +13 −30 Original line number Diff line number Diff line Loading @@ -153,8 +153,6 @@ struct max3421_hcd { */ struct urb *curr_urb; enum scheduling_pass sched_pass; struct usb_device *loaded_dev; /* dev that's loaded into the chip */ int loaded_epnum; /* epnum whose toggles are loaded */ int urb_done; /* > 0 -> no errors, < 0: errno */ size_t curr_len; u8 hien; Loading Loading @@ -492,39 +490,17 @@ max3421_set_speed(struct usb_hcd *hcd, struct usb_device *dev) * Caller must NOT hold HCD spinlock. */ static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, int force_toggles) max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); int old_epnum, same_ep, rcvtog, sndtog; struct usb_device *old_dev; int rcvtog, sndtog; u8 hctl; old_dev = max3421_hcd->loaded_dev; old_epnum = max3421_hcd->loaded_epnum; same_ep = (dev == old_dev && epnum == old_epnum); if (same_ep && !force_toggles) return; if (old_dev && !same_ep) { /* save the old end-points toggles: */ u8 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); rcvtog = (hrsl >> MAX3421_HRSL_RCVTOGRD_BIT) & 1; sndtog = (hrsl >> MAX3421_HRSL_SNDTOGRD_BIT) & 1; /* no locking: HCD (i.e., we) own toggles, don't we? */ usb_settoggle(old_dev, old_epnum, 0, rcvtog); usb_settoggle(old_dev, old_epnum, 1, sndtog); } /* setup new endpoint's toggle bits: */ rcvtog = usb_gettoggle(dev, epnum, 0); sndtog = usb_gettoggle(dev, epnum, 1); hctl = (BIT(rcvtog + MAX3421_HCTL_RCVTOG0_BIT) | BIT(sndtog + MAX3421_HCTL_SNDTOG0_BIT)); max3421_hcd->loaded_epnum = epnum; spi_wr8(hcd, MAX3421_REG_HCTL, hctl); /* Loading @@ -532,7 +508,6 @@ max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, * address-assignment so it's best to just always load the * address whenever the end-point changed/was forced. */ max3421_hcd->loaded_dev = dev; spi_wr8(hcd, MAX3421_REG_PERADDR, dev->devnum); } Loading Loading @@ -667,7 +642,7 @@ max3421_select_and_start_urb(struct usb_hcd *hcd) struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum, force_toggles = 0; int epnum; struct usb_host_endpoint *ep; struct list_head *pos; unsigned long flags; Loading Loading @@ -777,7 +752,6 @@ max3421_select_and_start_urb(struct usb_hcd *hcd) usb_settoggle(urb->dev, epnum, 0, 1); usb_settoggle(urb->dev, epnum, 1, 1); max3421_ep->pkt_state = PKT_STATE_SETUP; force_toggles = 1; } else max3421_ep->pkt_state = PKT_STATE_TRANSFER; } Loading @@ -785,7 +759,7 @@ max3421_select_and_start_urb(struct usb_hcd *hcd) spin_unlock_irqrestore(&max3421_hcd->lock, flags); max3421_ep->last_active = max3421_hcd->frame_number; max3421_set_address(hcd, urb->dev, epnum, force_toggles); max3421_set_address(hcd, urb->dev, epnum); max3421_set_speed(hcd, urb->dev); max3421_next_transfer(hcd, 0); return 1; Loading Loading @@ -1380,6 +1354,15 @@ max3421_urb_done(struct usb_hcd *hcd) status = 0; urb = max3421_hcd->curr_urb; if (urb) { /* save the old end-points toggles: */ u8 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); int rcvtog = (hrsl >> MAX3421_HRSL_RCVTOGRD_BIT) & 1; int sndtog = (hrsl >> MAX3421_HRSL_SNDTOGRD_BIT) & 1; int epnum = usb_endpoint_num(&urb->ep->desc); /* no locking: HCD (i.e., we) own toggles, don't we? */ usb_settoggle(urb->dev, epnum, 0, rcvtog); usb_settoggle(urb->dev, epnum, 1, sndtog); max3421_hcd->curr_urb = NULL; spin_lock_irqsave(&max3421_hcd->lock, flags); usb_hcd_unlink_urb_from_ep(hcd, urb); Loading
fs/seq_file.c +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ static void seq_set_overflow(struct seq_file *m) static void *seq_buf_alloc(unsigned long size) { if (unlikely(size > MAX_RW_COUNT)) return NULL; return kvmalloc(size, GFP_KERNEL_ACCOUNT); } Loading